Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How to call s function from m file?
Replies: 3   Last Post: Oct 17, 2013 8:49 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Prabhakaran thirugnanam

Posts: 37
Registered: 6/17/10
Re: How to call s function from m file?
Posted: Oct 17, 2013 8:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Chirag Joshi" <chirag.joshi@ism.uni-karlsruhe.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.uni-karlsruhe.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 s-function is for use within Simulink, not from a MATLAB file.
> >
> > Arnaud

> Thanks for the feedback .
> Regards,
> Chirag

S-Function MEX file can be called from M-file, But your S-funciton.c file should contain a function "mexFunction". In the M-file If the mex file(.mex32) is called in the m-file, the corresponding s-funciton shall be executed. I found this feature in R2009b.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.