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 use simulink get the value from last cycle(step)?
Replies: 5   Last Post: Nov 28, 2012 3:25 AM

Advanced Search

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

Posts: 31
Registered: 4/10/06
how to use simulink get the value from last cycle(step)?
Posted: May 23, 2006 6:05 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

the general idea in C/C++ is as followings:

// actual position
p_actual = value_from_sensor();

// actual velocity
v_actual = (p_actual - p_last) / time_step;

// store the actual position for the next step
p_last = p_actual; --> how to do this step in simulink?

in order to calculate the v_actual, I have to store the position from
last step, but how to store this value in simulink?

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

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.