Search code examples
matlabsimulink

how to programmatically rotate a simulink block


I'm trying to build a "binary-tree like" structure using output switches, and I would like to build it top-down.

In the simulink designer, I can rotate the block clock-wise by simply typing cmd-r, but I can't find how to do it programatically, which I need in order to build a very big structure.

Any tips are greatly appreciated.


Solution

  • Once the block is added, change its Orientation property, e.g.

    set_param('NameOfBlock','Orientation','up');