Is there a simple way to change sampling rate of multiple blocks in Simulink?
Ältere Kommentare anzeigen
Dear Experts,
Just wondering if there is a simple way to change sampling rate of multiple blocks?
Or if there is a programmatic way of list out all blocks inside a model, and use list assignment to change sampling rate?
Please comment,
Thanks,
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 24 Feb. 2014
ts=0.0001 % your sample time
s=find_system('untitled')
for k=2:numel(s)
m=s{k}
try
b=get_param(m,'sample time');
set_param(m,'sample time',num2str(ts))
catch
end
end
1 Kommentar
legendbb
am 24 Feb. 2014
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!