我想以旧格式保存Simulink模型,但下面的代码似乎不起作用
我试过了:
miF = fullfile('toi','mok','tables');
files = dir(miF);
for k = 3:numel(files)
x = fullfile(miF,files(k).name);
cd(x);
mdl = { dir('*.mdl'),dir('*.slx')}; % here it works if only I set dir('*.mdl')
for i = 1:numel(mdl)
load_system(mdl(i).name);
save_system(mdl(i).name,mdl(i).name, 'SaveAsVersion','R2012b');
end
end