Hello, my problem is about creating Simulink Model in with script, due to variable model size I want to generate my model with help of for loops. When I use such command:
for k=1:n Submodulename =sprintf('Submodule_%d' ,k); pos = [x y+3*k*offset (x+w) (y+h+6*k*offset)]; add_block('NPC_MMC_Library/Submodule', Submodulename,... 'Position',pos); end
Even my variable block name Submodulename is changing but add_block doesn't work,
thanx for any help in advance, Regards
Best Answer