Simulink: Need help using simulation time as a variable in Simulink Calculations

17 Ansichten (letzte 30 Tage)
Hi,
I'm working on some Simulink code that does calculations for elastances in the heart and I want to set the simulation time and step size to be controlled by variables in my MATLAB script. I also was trying to figure out how to use the simulation time as a variable to input into my calculations. So for example, if the current simulation time is 2.05 seconds I want to use that single value in the area circled in blue below. I'd greatly appreaciate the help with this. Please let me know if you need more explaination.
Thanks!

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 25 Jul. 2020
Use the Clock block from Simulink Sources.
  3 Kommentare
Julian Thrash
Julian Thrash am 26 Jul. 2020
I just tried it and it worked great. Thanks for the help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by