How can I save multiple Data.mat from an Simulink Model Output;
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!