Mask editor problem.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Badr Taleb
am 3 Jun. 2018
Kommentiert: Badr Taleb
am 4 Jun. 2018
Pleas how can i creat a variable in mask that can be calculated from other two variables from the same mask like x=a+b, i tried to use the instruction ' * set_param('model/block','variable','a+b');*' in the Initialization, but no result appear in the mask, pleas how can i make this variable automaticly updated working?
2 Kommentare
Akzeptierte Antwort
TAB
am 4 Jun. 2018
In Mask Initialization function
aVal = str2double(get_param(gcbh, 'a')); % a is existing mask parameter
bVal = str2double(get_param(gcbh, 'b')); % b is existing mask parameter
set_param(gcbh, 'c', num2str(aVal+bVal)); %c is existing mask parameter
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Author Block Masks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!