MATLAB: Set slider Max and Min value

gui slider

I tried to set the Min value of slider to 1 and Max value to 2. But after I execute it,the slider doesn't appear in GUI and matlab return an error: Warning: slider control can not have a Value outside of Min/Max range Control will not be rendered until all of its parameter values are valid
Anyone know how to solve this problem?

Best Answer

What 'Value' are you initializing the slider to? The default is 0 for a slider no matter what the Min and Max are.