Re: problem with GUI



Then i have to declare handle in the callback? I mean to write :
function hedit_fmin_Callback (hObject, eventdata, handle)

Bob wrote:


bru wrote:


Dear friends,

I'm new with GUI and i have to problem when i take the data
from
it...

I do the next
--------------------------------------------------
function hboton_OK_Callback (hObject, eventdata)
function hedit_fmin_Callback (hObject, eventdata)
auxiliar=str2double(get(hObject,'String'));
%Ahora hemos de controlar que haya puesto realmente un numero
if isnan(auxiliar)
errordlg('Debes introducir un valor numerico en frec. min',
'Variable falsa', 'modal');
return
else
freqmin=auxiliar;
end
--------------------------------------------------

If i do it this way, Could I use the variable freqmin after? Or
should i use handle?¿?

Thanks for you help !!!

Try

handles.freqmin = auxiliar;
% Update handles structure
guidata(hObject, handles);
.



Relevant Pages

  • Re: problem with GUI
    ... I'm new with GUI and i have to problem when i take the data from ... function hedit_fmin_Callback (hObject, eventdata) ... 'Variable falsa', 'modal'); ...
    (comp.soft-sys.matlab)
  • problem with GUI
    ... I'm new with GUI and i have to problem when i take the data from ... function hedit_fmin_Callback (hObject, eventdata) ... 'Variable falsa', 'modal'); ...
    (comp.soft-sys.matlab)
  • Re: How to call a components callback function in another components callback function
    ... Actually I'm not much expereiced in MATLAB and I have tried to design GUI using drag-n-drop method and not actually by coding for UI components. ... % hObject handle to figure ... % eventdata reserved - to be defined in a future version of MATLAB ... % handles structure with handles and user data ...
    (comp.soft-sys.matlab)
  • Re: about handles
    ... % hObject handle to figure ... % eventdata reserved - to be defined in a future version of MATLAB ... % handles structure with handles and user data ... function varargout = timer_ex_OutputFcn ...
    (comp.soft-sys.matlab)
  • Re: about handles
    ... % hObject handle to figure ... % eventdata reserved - to be defined in a future version of MATLAB ... % handles structure with handles and user data ... function varargout = timer_ex_OutputFcn ...
    (comp.soft-sys.matlab)