I am building a GUI and have noticed that a few of my inputs have been converted from a scalar into a vector by a uicontrol function. Here is a sample code which shows that my scalar input being transformed into a vector matrix:
clcfig=figure('Visible','on','Menu','none','Resize','off','NumberTitle','off','Name',... 'test3','Position',[50 50 500 500],'color',[0.7 0.7 0.7]);x = 100value_x = xsize_x = size(x)scalar_x = isscalar(x)hx = uicontrol('String',x,'Tag','x','Style','edit','Parent',fig,'Position',[100 192 40 15]);value_hx = get(hx,'String')size_hx = size(get(hx,'String'))scalar_hx = isscalar(get(hx,'String'))
Any ideas on how to stop or work around this?
Thanks in advance for your help!
Best Answer