Read BlockType of SimscapeBlocks

1 回表示 (過去 30 日間)
Cedric Götze
Cedric Götze 2015 年 6 月 12 日
コメント済み: Cedric Götze 2015 年 6 月 16 日
Hello I try to read some parameters with MATLAB out of my Simulink file. I do so by the following code
load_system(x);
Blocktypes = get_param(find_system(x,'Type','Block'),'BlockType');
But if i use some kind of Simscape Block in Simulink, i get only 'SimscapeBlock' as result. Is it possible to find out which kind of Simscapeblock is used? This ...
load_system(x);
Blocktypes = get_param(find_system(x,'Type','Block'),'Name');
... is no solution because I changed all the original names!
Thanks in Advanced! Cedric

採用された回答

Sebastian Castro
Sebastian Castro 2015 年 6 月 12 日
Looks like the ClassName block parameter might return what you want. For example:
>> get_param(gcb,'ClassName')
ans =
dc_voltage_source
- Sebastian
  1 件のコメント
Cedric Götze
Cedric Götze 2015 年 6 月 16 日
Thank You

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by