How can I save multiple Data.mat from an Simulink Model Output;

조회 수: 3 (최근 30일)
Bob
Bob 2016년 7월 21일
편집: Azzi Abdelmalek 2016년 7월 21일
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

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 7월 21일
편집: Azzi Abdelmalek 2016년 7월 21일
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개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by