using add_block in a for loop
古いコメントを表示
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
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programmatic Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!