How can I save multiple Data.mat from an Simulink Model Output;
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Bob
am 21 Jul. 2016
Bearbeitet: Azzi Abdelmalek
am 21 Jul. 2016
I have an output data from a simulink model. I want to save the output data inside a loop for a different input variable. How can I do that?
for i=1:1:200
np = 800+i; % input variable to simulink model
sim('Simulink_Model') % output data
save('Data.mat','Data'); % save('FileName','Variables');
end
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 21 Jul. 2016
Bearbeitet: Azzi Abdelmalek
am 21 Jul. 2016
for ii=1:200
np = 800+i; % input variable to simulink model
sim('Simulink_Model') % output data
M(:,:,ii)=Data %or M(:,ii) depending on the dimension of Data
end
save('Data.mat','M'); % save('FileName','Variables');
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Programmatic 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!