how to run a m file as in MatLab?

yiu-man wong ymwong2 at gmail.com
Mon Oct 4 00:00:32 CEST 2010


I find xcos.
So disregard this email for help.

On Oct 3, 2010, at 5:33 PM, yiu-man wong wrote:

> 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/672a5c3c/attachment.htm>


More information about the users mailing list