Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: How to call s function from m file?
Posted:
Oct 17, 2013 8:49 AM


"Chirag Joshi" <chirag.joshi@ism.unikarlsruhe.de> wrote in message <hai5ae$1t0$1@fred.mathworks.com>... > "Arnaud Miege" <arnaud.miege@nospam.mathworks.co.uk> wrote in message <hag81m$gi0$1@fred.mathworks.com>... > > "Chirag Joshi" <chirag.joshi@ism.unikarlsruhe.de> wrote in message <hafdfq$bg4$1@fred.mathworks.com>... > > > Hello folks, > > > > > > I am trying to solve ODE using s function call in M file. > > > > > > 1. I would like to know, if use of s function is going to speed up my code. > > > 2. Whats the correct syntax to call s function from M file. > > > > > > Thanks in advance, > > > > > > Chirag Joshi > > > > An sfunction is for use within Simulink, not from a MATLAB file. > > > > Arnaud > > Thanks for the feedback . > > Regards, > Chirag
SFunction MEX file can be called from Mfile, But your Sfunciton.c file should contain a function "mexFunction". In the Mfile If the mex file(.mex32) is called in the mfile, the corresponding sfunciton shall be executed. I found this feature in R2009b.
Regards T.Prabhakaran



