Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


cdrsir
Posts:
31
Registered:
4/10/06


how to use simulink get the value from last cycle(step)?
Posted:
May 23, 2006 6:05 AM


the general idea in C/C++ is as followings:
while(true) { // 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?



