Simulink Mask won't display parameter values

I want my masked subsystem to display two parameter values, but for some reason it is only displaying the variable name. I am not sure what the problem is. Photos are attached.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2024년 7월 19일
  1. Variable 'label' is inside the function. It is not visible in the mask workspace.
  2. disp(label), not disp('label')
  3. Use the following code for "Icon"
Kp=get_param(gcb,"Kp");
Ki=get_param(gcb,"Ki");
str1="Kp="+Kp;
str2="Ki="+Ki;
label=[str1;str2];
disp(label)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Author Block Masks에 대해 자세히 알아보기

제품

질문:

N/A
2024년 7월 19일

답변:

2024년 7월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by