How to get Simulink block name
42 ビュー (過去 30 日間)
古いコメントを表示
I have this Simulink sample model
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1450227/image.png)
I would like to get the block names (Duty cycle D, Input voltage, PWM etc.).
I know that there is Simulink command like get_param(handle,property); which possibly can return that name but what is the name of the param itself?
0 件のコメント
回答 (1 件)
Daniel
2023 年 8 月 4 日
As documented in the get_param documentation, BlockPaths = get_param(gcs,'blocks') will return the list of blocks at the level of gcs. Or you can provide the name of your system directly rather than gcs, e.g. 'mymodel' or 'mymodel/path/to/mysubsystem'.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!