DSPRelated.com
Forums

Simulink and S-functions

Started by Sergio Dominguez February 3, 2003
hi all!

There is something that I really do not understand!! I have run a simulation
in which I compare outputs of an s-function and the implementation of the
s-function as simuling blocks (no derivatives involved in the s-function, only
algebra) and the outputs are different (by small amounts in determinates
instants of time, not completely different, but remarkably different)!!
Furthermore if I output from the
s-function the same expression written in different ways, those 2 outputs are
different! Can somebody comment on this? Have you seen something similar? Are
there restrictions or recommendations on the use of s-functions??

cheers,

Sergio



Hi,
Can you give more details on the type of expressions
you were using? Is your S-function multi-rate?

There is a document on "writing S-functions". That
should have all info needed.

Navan

--- Sergio Dominguez <> wrote:
> hi all!
>
> There is something that I really do not understand!!
> I have run a simulation
> in which I compare outputs of an s-function and the
> implementation of the
> s-function as simuling blocks (no derivatives
> involved in the s-function, only
> algebra) and the outputs are different (by small
> amounts in determinates
> instants of time, not completely different, but
> remarkably different)!! Furthermore if I output from
> the
> s-function the same expression written in different
> ways, those 2 outputs are
> different! Can somebody comment on this? Have you
> seen something similar? Are
> there restrictions or recommendations on the use of
> s-functions??
>
> cheers,
>
> Sergio


__________________________________________________