Effacer les filtres
Effacer les filtres

Simulink Mask won't display parameter values

14 vues (au cours des 30 derniers jours)
Mark
Mark le 19 Juil 2024 à 14:10
Réponse apportée : Fangjun Jiang le 19 Juil 2024 à 16:26
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.

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 19 Juil 2024 à 16:26
  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)

Catégories

En savoir plus sur Subsystems dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by