Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Same codes do not work ?
조회 수: 4 (최근 30일)
이전 댓글 표시
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'));
댓글 수: 0
답변 (1개)
Image Analyst
2013년 3월 13일
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
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!