Slider warnings and errors!!!
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello to all,
I am using some sliders in my GUI and after I enter the values in my "Values" section in property editor Matlab sys that
Warning: slider control requires a scalar value.
I entered , the following set of numbers:
500000
1000000
2000000
5000000
10000000
and it still was not satisfied!
What kind of variables does it like?
Best regards,
Jean
댓글 수: 0
답변 (2개)
Fangjun Jiang
2011년 7월 21일
You can only specify one number, e.g. 50000.
For this problem, I think the program GUIDE needs to be improved. A slider is for the user to input a value between the Min and Max. So the property editor allows the user to specify the Min value and the Max value. The "Value" property specify the initial position of the slider. Why does the property editor under GUIDE for slider allow the user to input multiple values?
댓글 수: 0
Paulo Silva
2011년 7월 21일
Fangjun Jiang is right, you are trying something similar to this:
s=uicontrol('style','slider')
set(s,'value',[1 2])
instead of
s=uicontrol('style','slider')
set(s,'value',1)
%inspect(s) %opens the property inspector
For the slider the property inspector has the Value line that accepts several values but you can only have one there because each slider can only have one value selected.
If you want the slider to jump only to certain values when the user moves it you must change the SliderStep property and probably Min and Max also.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!