Accepting the passed value in functions

2 ビュー (過去 30 日間)
Gowrishankar R
Gowrishankar R 2015 年 5 月 31 日
コメント済み: Gowrishankar R 2015 年 6 月 1 日
I am developing an MATLAB GUI in which i have 3 pushbuttons.i have finished coding for pushbutton1 callback. In end of the second push button callback function i assigned image to some handle like
handles.img=y;
set(handles.pushbutton3,'enable','on');
guidata(hObject,handles);
i want to pass this handle or i want to use that handle(i.e handle.img) in pushbutton3 callback, so that when i press pushbutton 3 image(i.e y) should be displayed in axes2. so what code i should add in pushbutton3 call back to get the image and display on axes2?

採用された回答

Image Analyst
Image Analyst 2015 年 5 月 31 日
In the pushbutton 3 callback, pass handles.img to imshow():
axes(handles.axes2); % Switch to axes 2.
imshow(handles.img); % Display handles.img.
  1 件のコメント
Gowrishankar R
Gowrishankar R 2015 年 6 月 1 日
It works.. thank you very much..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by