MATLAB: Simulink model layout

layoutmodel

Hello all I have a matlab function which generates a simulink model for specific tasks, i.e, it instantiates blocks, ports and connects them. But the generated model does not look fine, so i have to manually place the blocks and ports. I need to do this in automated way and finally have some model layout. Any suggestion, please.
Thanks, Gagik

Best Answer

You can use the set_param command to programmatically set the position of a block:
set_param('path/to/block', 'Position', [left, top, right, bottom])
The origin is located in the upper left corner of the model window.