フィルターのクリア

Simulink Block 'To File' savings during Parsim

3 ビュー (過去 30 日間)
Elias Julian Hempen
Elias Julian Hempen 2023 年 8 月 30 日
回答済み: Raymond Norris 2023 年 8 月 30 日
Hi, Ive a question about the parallel simulation with the parsim command. Inside the simulink model, there are three 'To file' blocks, which log the signal to a matlab .mat file. Now, I want to execute multiple simulations with parsim. Do all blocks generate a file with an index or will the files be overwritten?
Thanks for any help!

採用された回答

Raymond Norris
Raymond Norris 2023 年 8 月 30 日
Hi @Elias Julian Hempen. parsim will append a number after the MAT-file. Take for example the following
model = 'elias';
load_system(model)
GainSweep = 1:8;
in(GainSweep(end)) = Simulink.SimulationInput(model);
for gidx = 1:numel(GainSweep)
in(gidx) = in(gidx).setBlockParameter('elias/Gain','Gain',num2str(GainSweep(gidx)));
end
S = warning("off");
out = parsim(in);
warning(S)
You'll notice 8 files generated, labeled "a-file_*.mat"

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by