MATLAB GUI set handles text problem.
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
if T==1
Disp = '1'
elseif T==2
Disp = '2'
elseif T==3
Disp = '3'
elseif T==4
Disp = '4'
elseif T==5
Disp = '5'
elseif T==6
Disp = '6'
elseif T==7
Disp = '7'
else
end
set(handles.text6,'string',Disp)
After number of elseif conditions i am writing above program. I am using GUI method. I am getting error as below.
Reference to a cleared variable handles.
Error while evaluating uicontrol Callback
How i can overcome it.! My all Disp values are Numeric only.!
4 comentarios
Geoff Hayes
el 4 de Abr. de 2016
Nimisha - if you always observe this error, then please put a breakpoint at the line
set(handles.text6,'string',Disp)
and then launch your GUI. Do whatever you normally would do and then press pushbutton10. Once the debugger pauses at this line, then look at the handles structure. Is it valid? Does it have a field named text6?
Respuestas (1)
Walter Roberson
el 4 de Abr. de 2016
Delete your "clear all". It is removing the content of "handles"
0 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!