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

 採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 2 月 13 日

0 投票

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.

2 件のコメント

Gagik Hakobyan
Gagik Hakobyan 2012 年 2 月 15 日
thanks, but i need to do set_param - s automatically, i.e, open any generated design, call some routine and finally have placed design (like dot layout which graphically views the graph).
Kaustubha Govind
Kaustubha Govind 2012 年 2 月 15 日
Sorry - I don't know of a tool that performs such automatic alignment.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeModeling についてさらに検索

タグ

質問済み:

2012 年 2 月 13 日

編集済み:

2013 年 10 月 13 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by