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: Count time steps in Simulink
Replies: 1   Last Post: Sep 12, 2000 8:10 AM

Advanced Search

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

Posts: 22
Registered: 12/7/04
Re: Count time steps in Simulink
Posted: Sep 12, 2000 8:10 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Tue, 12 Sep 2000, Stefan Ahlman wrote:

> Hi!
>
> I have a time-discrete Simulink model with a fixed step size of 1. For
> one signal I would like a routine to count the number of time steps
> elapsed from when the signal reaches below a certain limit to when the
> signal reach the limit again. When the signal exceeds the limit the
> counter should be reset to zero. I think a S-function should do the
> trick, but unfortunately I find the syntax of S-functions to be a bit
> complicated.


What about using a ramp source in an enabled subsystem?

+----------------------------+ Want to know the secret to riding a bike
| | from Fairbanks to Anchorage?
| Greg Anderson | 1. Push down with left foot.
| Rogue Squadron - Rogue 31 | 2. Push down with right foot.
| dwarf@wam.umd.edu | 3. Repeat.
| timbwolf@glue.umd.edu | 4. Stop when you reach Anchorage.
| AIM - Aranthon |
| www.wam.umd.edu/~dwarf | I know it seems pretty simple, but it
| | worked for me. AAVR 1, 8/20-8/26, 2000
+----------------------------+ Want to help me wipe out AIDS? Ask me how!





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

[Privacy Policy] [Terms of Use]

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