Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Running an iterator "for" command in simulink?

1 Ansicht (letzte 30 Tage)
Siavash
Siavash am 10 Feb. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Dear Guys.
I have a problem running Simulink. I want to Make a model and arrange in a way that after each run a new number enters the calculation process and get an individual output without overwriting the previous one.\My matlab command is simply like this:
for i=1:100
for j=1:50
x(i,j)=i+j
end
end
this is a very simple command in matlab but in simulink if i use the intervals in constant block, the whole model runs together. how can i make such a model in simulink. Actually i want the model to do the j calculations and after that it goes and takes a new i and repeat the j calculation again and store the new sets of data as a new output without overwriting the previous one. By the way i think simulink will add all the outputs so instead of 5000 outputs we only have 1.
A copy of my simulink model has been attached.

Antworten (0)

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by