Set function not working.

1 visualización (últimos 30 días)
Philosophaie
Philosophaie el 29 de Abr. de 2016
Comentada: Walter Roberson el 29 de Abr. de 2016
I am having trouble with the "set" function
Error in GUIfunction>Evaluate (line 101)
set(Bn,'String',num2str(Bn1));
Error while evaluating UIControl Callback
uicontrol('Style','pushbutton','String','Evaluate','Position',[130,550,100,50],'Callback',{@Evaluate},'BackgroundColor','green');
Bn = uicontrol('Style','edit','String','','position',[10 450 100 20]);
set(f,'Visible','on');
handles = struct('Bn',Bn);
guidata(f, handles);
function Evaluate(hObject, eventdata, handles)%#ok
handles = guidata(hObject);
Bn = handles.Bn;
Bn1=40;
set(Bn,'String',num2str(Bn1));
  1 comentario
Walter Roberson
Walter Roberson el 29 de Abr. de 2016
There should be at least one more line of error message before the ones you show, indicating the kind of problem that is being encountered, like no such property or not an object

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by