フィルターのクリア

How can I get the number of tunable parameters and number of observable signals in a Simulink model?

1 回表示 (過去 30 日間)
Jeffrey
Jeffrey 2023 年 10 月 24 日
編集済み: Jeffrey 2023 年 10 月 26 日
How can I get the number of tunable parameters and number of observable signals in a Simulink model? This used to be accomplished by:
tg = slrt;
tg.NumParameters
tg.NumSignals
But this has changed in the latest version of Matlab. There isn't any documentation on what these might have changed to.

回答 (1 件)

Pratyush
Pratyush 2023 年 10 月 25 日
Hi Jeffrey,
I understand that you want to get the tunable parameters and the observable signals in a Simulink model.
You can use Simulink Real-Time Explorer for it. You can refer to the following link for more details on Simulink Real-Time Explorer: https://in.mathworks.com/help/slrealtime/ref/simulinkrealtimeexplorer-app.html
Here's how you can do it:
  1. Open your Simulink model.
  2. Run a simulation of the model.
  3. Open the Simulation Data Inspector by typing Simulink.sdi.view in the MATLAB command window.
  4. In the Simulation Data Inspector window, click on the "Signals & Parameters" tab.
  5. Under the "Signals" section, you will find the list of observable signals. The number of observable signals is displayed at the bottom of this section.
  6. Under the "Parameters" section, you will find the list of tunable parameters. The number of tunable parameters is displayed at the bottom of this section.
Hope this helps.
  1 件のコメント
Jeffrey
Jeffrey 2023 年 10 月 26 日
Hello, Pratyush, thanks for your answer. I cannot use Simulink Real-Time Explorer, because I am modifying some older code that uses NumParameters and NumSignals, and I need it to be in MATLAB code. So, I don't have the option for interactivity.

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

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by