about setting setBlockParameter (blkParam, paramVal)

2 ビュー (過去 30 日間)
기범
기범 2022 年 12 月 29 日
コメント済み: Paul 2022 年 12 月 30 日
I have a qusestion about setting setBlockParameter.
In example,
blkParam is 'Gain' and 'Position'.
Question for here.
  1. Are these 'Gain' and 'Position' is designated text arrays in Metlab?
  2. Can't I set it to my own text I want?
plus
In example.
paramVal is '40'
Question for here.
3. I want to change value '40' to 1x4 maxtrix [1 0 0 0], how can i change the value?

採用された回答

Paul
Paul 2022 年 12 月 29 日
A1. Gain and Position are block parameters. Position is a paramter that is common to all blocks. More info here Common Block Properties Gain is a block parameter unique to the Gain block. More info here Block-Specific Parameters.
A2. No, you can't change the names of those parameters, only their values.
A3.
simin = setBlockParameter(simin,'vdp/Mu','Gain','[1 0 0 0]');
Of course, you have to make sure that the model will still work with that value for Gain.
  8 件のコメント
기범
기범 2022 年 12 月 30 日
oh I'm Sorry.
The H block was integrator block.
Paul
Paul 2022 年 12 月 30 日
Sounds like you have it sorted out. Good luck with your project.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by