Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Same codes do not work ?

4 visualizaciones (últimos 30 días)
engineerOfPhysics
engineerOfPhysics el 13 de Mzo. de 2013
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I want to ask that these two codes are same ? if it is they do not work as same job, if it is not, what is the mean both of them ? and where I can use them in which situations ?
theta=str2double(get(handles.hObject,'String'));
handles.theta=str2double(get(hObject,'String'));

Respuestas (1)

Image Analyst
Image Analyst el 13 de Mzo. de 2013
It looks like you're using GUIDE. The first one takes the target of the callback, presumably an edit field or something, and assigns it to a local variable that lives just within that callback and vanishes when you're done executing that callback.
The second one attaches (or replaces if it already exists) theta as a member to the handles structure, which, if you call guidata() before you exit the callback, will survive and be seen in other callbacks.
  1 comentario
engineerOfPhysics
engineerOfPhysics el 13 de Mzo. de 2013
Your explanation is so helpful thanks for that ..
Can you give an example to use them where can be ?

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by