How to know what type of block is?

8 ビュー (過去 30 日間)
jose bernardo
jose bernardo 2013 年 11 月 22 日
回答済み: Vishal Rane 2013 年 11 月 22 日
Hello:
I am using this code to know the type of blocks who are in a system of simulink
tipo = get_param(['',gate{1},''],'BlockType');
But this only said if its a pulsegenerator or a Logic gate.
I would like to know if its possible to know how type of Logic gate is(nand, nor,...), number of inputs,....
Thanks

採用された回答

Vishal Rane
Vishal Rane 2013 年 11 月 22 日
tipo = get_param(gate{1}],'Operator');
will give you the type of logic gate. The extra quotes alongwith the concatenation are probably unnecessary.
Use
get( get_param( gate{1}, 'Object'))
to get the entire properties structure. The fieldnames are the properties e.g. 'Operator'

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by