For loop in Simulink?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
adi kul
am 20 Apr. 2015
Beantwortet: Bharath H S
am 20 Apr. 2015
I am converting Matlab code into Simulink model. For which I need to know the way I can add "for loop" in Simulink.
Here is the code:
for m=1:100
x(m)=354.6E0/y(m);
z(m)=x(m)/3600.0E0*volume;
end
Can anyone tell me how to put it in Simulink block model?
0 Kommentare
Akzeptierte Antwort
Bharath H S
am 20 Apr. 2015
Hi,
You could try the For Iterator Subsystem. http://in.mathworks.com/help/simulink/slref/foriteratorsubsystem.html
Else you could simply make a subsystem with y as input and z = f(y) as output and run your simulation with time step of 1s upto 100s. Hope this helps!!
Cheers!
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!