<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I find the execution command.<div>So disregard this email.</div><div>Now I have to figure out the counter part to simulink.</div><div><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">yiu-man wong <<a href="mailto:ymwong2@gmail.com">ymwong2@gmail.com</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">October 3, 2010 4:37:04 PM EDT<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>how to run a m file as in MatLab?</b><br></span></div><br><div>In MatLab, one can write a M file with a name, e.g. plotDefinedFunction.<br>Then typing the name, plotDefinedFunction, in the workspace will run the file.<br>Does Scilab has this important feature?<br>+++<br>//filename: plotDefinedFunction<br>function f = myquadratic ( x )<br>   f = x^2<br> endfunction<br>  // <br>  xdata = linspace ( 1 , 10 , 50 ); <br>  ydata = myquadratic ( xdata );<br>  plot ( xdata , ydata , "+-" ) <br>  xtitle ( "My title" , "X axis" , "Y axis" );<br>++++<br><br><br>Thanks.</div></blockquote></div><br></div></body></html>