- Variable 'label' is inside the function. It is not visible in the mask workspace.
- disp(label), not disp('label')
- Use the following code for "Icon"
Simulink Mask won't display parameter values
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Fangjun Jiang
2024-7-19
Kp=get_param(gcb,"Kp");
Ki=get_param(gcb,"Ki");
str1="Kp="+Kp;
str2="Ki="+Ki;
label=[str1;str2];
disp(label)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!