10-10-2008 05:55 AM
Hi,
Can Mathscript handle functions subroutines? In the Mathscript window I get the error message
"unexpected token: function"
For example:
function y = xx(a, b, c)
...
....
return
where xx is being called from the main program.
Thanks in advance
10-10-2008 08:55 AM
Hi,
If you want to invoke a subroutine, the best way is to save the function as a .m script. The name of the script should be the same as your function name. Save the script in the MathScript searching path. You can set the searching path in MathScript properties. Just use Ctrl+I in MathScript Window. Then, you can invoke your subroutine in MathScript Window, such as xx(a, b, c).
10-10-2008 10:26 AM
Hi,
Thats for the response. It appears to be calling up the functions.
Can I evoke m files using the Mathscript Node environment? If so what command do I use to specify the search path?
Thanks in advance
10-12-2008 08:31 PM
10-14-2008 10:39 AM
Hello,
Of the two options that ttrr presents for setting the search path, the Tools->Options dialog is much preferred. If you use this method, performance of your scripts will be much faster. Use the path and addpath functions only when you want to change the search path programatically at run-time.
jattas