Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
S-Function: value from previous time step

Subject: S-Function: value from previous time step

From: isah

Date: 7 Jul, 2004 06:57:27

Message: 1 of 3

Hello,

in mdlDerivatives in every time step I need a value from the previous
time step, which should not be integrated. How can I pass the value?

Thanks a lot

isah

Subject: S-Function: value from previous time step

From: Kelvin Hales

Date: 7 Jul, 2004 12:18:00

Message: 2 of 3

In article <eee25b9.-1@webx.raydaftYaTP>, Isah wrote:
> Hello,
>
> in mdlDerivatives in every time step I need a value from the previous
> time step, which should not be integrated. How can I pass the value?
>
> Thanks a lot
>
> isah

Make use in your s-function of the facility for discrete-states. See
sfunmem.m for ideas.

Kelvin B. Hales
Kelvin Hales Associates Limited
Consulting Control Engineers
E-mail: khales@khace.com
Web: www.khace.com

Subject: S-Function: value from previous time step

From: riccardo

Date: 7 Jul, 2004 11:14:46

Message: 3 of 3

isah wrote:
>
>
> Hello,
>
> in mdlDerivatives in every time step I need a value from the
> previous
> time step, which should not be integrated. How can I pass the
> value?
>
> Thanks a lot
>
> isah
isah,
you can use any Work Area (states, DWorks, etc.) available to an
s-function.
HTH
riccardo
(no hyphens in my address)

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us