about setting setBlockParameter (blkParam, paramVal)
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a qusestion about setting setBlockParameter.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1246292/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1246297/image.png)
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1246302/image.png)
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!