Slider warnings and errors!!!
6 ビュー (過去 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!