Simulink, "Matlab function block" with constant input and dynamic output
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I want to create a function block with constant inputs, but which has a dynamic output.
Specifically, my input gives me the start value for a function in the block. I want to output the calculated intermediate values (while - loop) in order to use them in another block.
Is this generally feasible with Simulink and if so, how?
Thank you and greetings
Tobias
0 Kommentare
Antworten (1)
Walter Roberson
am 28 Aug. 2019
No, it does not make sense in Simulink.
What you can do is use a discrete time system. Use a MATLAB Function Block. The state information will tell you when you are initializing; read the inputs and store whatever necessary information into persistent variables. Then after that, each time the function is invoked, refer to the state information you saved in persistent variables and calculate one round of while loop, with the output being the results of the intermediate calculation.
1 Kommentar
Siehe auch
Kategorien
Mehr zu Interactive Model Editing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!