MATLAB Answers

How to put variable name in Y-limits of a scope in Simulink programmatically from Matlab

18 views (last 30 days)
Wicki Byamba
Wicki Byamba on 30 Mar 2021
Commented: Wicki Byamba on 8 Apr 2021 at 16:10
I want to put variables names in the Y-limits of a scope in Simulink( v10) with Matlab (v2019b). To be able to control the Y-limits of my scopes with variables associated to the thing i'm measuring.
I can do it with the GUI via the Y-limits (minimum) and Y-limits (maximum) but the value stored in Y-limits (when i do "get_param(path,'scopeconfiguration')") is the vector with the numerical value.
But when I try to do it programmaticall, I can't put variable names. As it only accept 2-element finite numeric vector.
Thanks in advance
Byamba

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 30 Mar 2021
Seems true but also, it works this way.
>> YY=5
YY =
5
>> set(gcbh,'ActiveDisplayYMaximum','YY')
>> get(gcbh,'ActiveDisplayYMaximum')
ans =
'5'
>> YY=3
YY =
3
>> set(gcbh,'ActiveDisplayYMaximum','YY')
>> get(gcbh,'ActiveDisplayYMaximum')
ans =
'3'
  3 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!