To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
Hi friends i am working with matlab gui. Problem is string values are not getting updated. please check the sample code below
if true function pushbutton_Callback(hObject, eventdata, handles) if strcmp(get(handles.pushbutton,'String'),'START') set(handles.pushbutton,'String','STOP') %some code while(strcmp(get(handles.pushbutton,'String'),'STOP')) disp('Entered while loop') %some code Input1=sscanf(InputTemp, '%d') set(handles.Textbox1, 'String', Input1) end [ Control ] = Controller( Input1 ) %function that will give control signal %depending on input temperature
if(Control=='0001') set(handles.Textbox2, 'String','some text' ) else set(handles.Textbox2, 'String','some text1' ) end %some code end else set(handles.pushbutton,'String','START') end
If i hit 'pushbutton' string "start" should be changed to "stop" but that is not happening. But if that is the case process should not enter while loop. But it is entering while loop and running every thing inside continuously as required(receiving values and sending desired values through serial port). Only problem i am getting in while loop is both edit text boxes 'Textbox1' and 'Textbox2' are not displaying required values. If i am terminating the process(Ctrl+C) then the final value of temperature and control strings are getting displayed. I am unable to find any error with the code. Please help me out with this.
Thanks in advance.
No products are associated with this question.