Changing the size and position of the simulink block
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Prerana Ozarkar
il 5 Mar 2019
Modificato: Prerana Ozarkar
il 5 Mar 2019
3 voti
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 Commento
Manuel K
il 8 Nov 2022
It's actually a: vector of coordinates, in pixels: [left top right bottom]
Categorie
Scopri di più su Programmatic Model Editing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!