guide callback function
Show older comments
how to use a veriable from one matlab callback function into another
i am defining veriable 'key' in func
'function scramblekey_Callback(hObject, eventdata, handles)'
& want to use it into func
'function embedwatermark_Callback(hObject, eventdata, handles)'
Answers (1)
Walter Roberson
on 11 Apr 2012
0 votes
5 Comments
kush
on 11 Apr 2012
Walter Roberson
on 11 Apr 2012
In first function:
handles.key = key;
uidata(gcf, handles);
In second function:
key = handles.key;
kush
on 11 Apr 2012
Jan
on 11 Apr 2012
A typo: "uidata" => "guidata".
Walter Roberson
on 11 Apr 2012
Yes, sorry. guidata() is correct.
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!