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
Thank you for your apply.
I have one more question.
Im using quaternion division block,
- I want to know blkParam for setting initial position.
This quaternion division block? I don't see anything in that block related to initial position. If another block, please provide link.
That the right one.
Thank you for providing get_param.
Thank you.
Sorry for late question.
Im qurious about setting a new parameter on the subsystem.
Is that possible?
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.
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.
oh I'm Sorry.
The H block was integrator block.
Sounds like you have it sorted out. Good luck with your project.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interactive Model Editing에 대해 자세히 알아보기
참고 항목
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 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)
