about setting setBlockParameter (blkParam, paramVal)
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
I have a qusestion about setting setBlockParameter.

In example,
blkParam is 'Gain' and 'Position'.
Question for here.
- Are these 'Gain' and 'Position' is designated text arrays in Metlab?
- 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
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 月 29 日
Thank you for your apply.
I have one more question.
Im using quaternion division block,
- I want to know blkParam for setting initial position.
Paul
2022 年 12 月 29 日
This quaternion division block? I don't see anything in that block related to initial position. If another block, please provide link.
기범
2022 年 12 月 29 日
That the right one.
Thank you for providing get_param.
Thank you.
기범
2022 年 12 月 29 日
Sorry for late question.
Im qurious about setting a new parameter on the subsystem.
Is that possible?
Paul
2022 年 12 月 29 日
I don't think you can define a new parameter for any block. I could be wrong.
However, each block has a UserData property that may provide nearly that functionality. For example, you can make the UserData value a struct, and each field of the struct can represent a parameter and its value.
기범
2022 年 12 月 30 日
In watertank model
(https://kr.mathworks.com/help/reinforcement-learning/ug/water-tank-reinforcement-learning-environment-model.html?searchHighlight=watertank&s_tid=srchtitle_watertank_3)

- blk = 'rlwatertank/Water-Tank System/H';
- in = setBlockParameter(in,blk,'InitialCondition',num2str(h));
I cannot find InitialCondition parameter in constant block.
But, the H is the constant block and setting some InitialCondition.
can you explain it?
And my purpose is want to set some intialValue for my quarternion Multiplication for my reinforment learning.
기범
2022 年 12 月 30 日
oh I'm Sorry.
The H block was integrator block.
Paul
2022 年 12 月 30 日
Sounds like you have it sorted out. Good luck with your project.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Interactive Model Editing についてさらに検索
参考
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
