Fwd: how to run a m file as in MatLab?
yiu-man wong
ymwong2 at gmail.com
Sun Oct 3 23:33:30 CEST 2010
I find the execution command.
So disregard this email.
Now I have to figure out the counter part to simulink.
Begin forwarded message:
> From: yiu-man wong <ymwong2 at gmail.com>
> Date: October 3, 2010 4:37:04 PM EDT
> To: users at lists.scilab.org
> Subject: how to run a m file as in MatLab?
>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101003/7fe84037/attachment.htm>
More information about the users
mailing list