Access variable names for Simscape block through code
2 ビュー (過去 30 日間)
古いコメントを表示
I would like to access the name of the variables of a generic Simscape block which is used in my model.
The function "get_param" works for block parameters, but not for block variables.
For example: suppose I have a Resistor block in my model; I am looking for a Matlab function which tells me that there exists a variable called "i", associated to this block
0 件のコメント
回答 (1 件)
Rohit Kulkarni
2023 年 8 月 23 日
Hi,
In my understanding you want to access the variable names from a simscape model
you can use the following function
[names,values,units] = symReadSSCVariables(componentName)
It returns cell arrays containing the names, values, and units of all variables from the Simscape™ component called componentName.
Thanks
参考
カテゴリ
Help Center および File Exchange で Troubleshooting についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!