My program works around the user input provided from user. It generates graph accordingly.But somehow I had set or default value for axes in Matlab GUI is [999 999] in my case, but my y-axis can be more than that. When i enter the value more than 999 in the text box, GUI didn't execute the function written for pushbutton. This works fine below 1000. I am wondering how can i change the Ylim to auto ?
When you enter 1000 in the 2nd input(Please refer figure), it gives following error:
Error using matlab.graphics.axis.Axes/setValue must be a 1x2 vector of numeric type in which the second element is larger than the first and may be InfError in axis>LocSetLimits (line 276) set(ax,...Error in axis (line 105) LocSetLimits(ax(j),cur_arg,names);Error in plotray (line 134) axis( [ rmin, rmax, zmin, zmax ] )Error in UnderwaterRayToolbox>pushbutton1_Callback (line 194)plotray( 'munkp' ), box on, hold onError in gui_mainfcn (line 95) feval(varargin{:});Error in UnderwaterRayToolbox (line 49) gui_mainfcn(gui_State, varargin{:});Error inmatlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)UnderwaterRayToolbox('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 276 set(ax,...
Can someone suggest how to change the Axes Ylimit to Auto or set to user input ??
Best Answer