how to run a m file as in MatLab?
yiu-man wong
ymwong2 at gmail.com
Sun Oct 3 22:37:04 CEST 2010
In MatLab, one can write a M file with a name, e.g. plotDefinedFunction.
Then typing the name, plotDefinedFunction, in the workspace will run the file.
Does Scilab has this important feature?
+++
//filename: plotDefinedFunction
function f = myquadratic ( x )
f = x^2
endfunction
//
xdata = linspace ( 1 , 10 , 50 );
ydata = myquadratic ( xdata );
plot ( xdata , ydata , "+-" )
xtitle ( "My title" , "X axis" , "Y axis" );
++++
Thanks.
More information about the users
mailing list