Changing the size and position of the simulink block
이전 댓글 표시
How can I change the position and size of the simulink block from the matlab command window?
sys = 'testmodel';
new_system(sys);
load_system(sys);
add_block('Simulink/Commonly Used Blocks/Subsystem',[sys '/subsystem])
add_block('builtin/Outport','testmodel/ouput1','MakeNameUnique','on')
now i have created one subsystem and one outport.
what are the commands i need to use for changing the model size and position of the block?
Thanks a lot
채택된 답변
추가 답변 (1개)
Prerana Ozarkar
2019년 3월 5일
편집: Prerana Ozarkar
2019년 3월 5일
3 개 추천
You need to use following command:
get_param(pathOfsystem, 'Position')
this will retuen you a 1X4 matrix in which positions will be stored in a manner [X Y Width Height]
댓글 수: 1
Manuel K
2022년 11월 8일
It's actually a: vector of coordinates, in pixels: [left top right bottom]
카테고리
도움말 센터 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!