How to plot 'Reset' button at Matlab GUI

i want to programmed a reset button what is the syntax or code that i can inserted. ok, this is an example if i want programmed a 'SAVE' button i used this syntax in matlab gui
Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
g=get(handles.axes2,'Userdata');
savePlotWithinGUI(g);
But how to programmed a 'RESET' button using same syntax like above.
This 'RESET' button is used for refresh the axes handles.

4 件のコメント

Jing
Jing 2013 年 3 月 7 日
Can you give more details? Is it just a button? uicontrol('Style', 'pushbutton', 'String', 'Reset')?
Jan
Jan 2013 年 3 月 7 日
I've closed this question, because it does not contain enough details to be answered. Please diti the question and add the relevant information to re-open the thread.
Walter Roberson
Walter Roberson 2013 年 3 月 11 日
Please explain what you want the RESET button to do.
Siti Nor Arma Bt Mohd Zainun
Siti Nor Arma Bt Mohd Zainun 2013 年 3 月 11 日
ok, first i upload a picture at the first axes, then i will enhance the image at the second axes, after that i want to upload another picture at 1st axes again, therefore i need to reset the both axes become clear. how can i programmed the 'reset button'?

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

 採用された回答

Walter Roberson
Walter Roberson 2013 年 3 月 11 日

1 投票

cla(handles.axes1)
cla(handles.axes2)

5 件のコメント

Siti Nor Arma Bt Mohd Zainun
Siti Nor Arma Bt Mohd Zainun 2013 年 3 月 11 日
ok thank you i will try this codec =)
Siti Nor Arma Bt Mohd Zainun
Siti Nor Arma Bt Mohd Zainun 2013 年 3 月 11 日
hye its working thank you so much, but i have other problem regarding the Matlab GUI, i want measure the picture in Matlab GUI, The image is browse from other file. I'm using the push button to browse the image. I was try the 'imdistline' syntax and the result shows only in pixel value. the problem now is, i want to convert the pixel into other unit, such as 'cm' or 'mm' in the picture. Please show or share with me the formula and the code that i can be inserted in GUI.
Walter Roberson
Walter Roberson 2013 年 3 月 11 日
You already have an active Question on that topic.
Jan
Jan 2013 年 3 月 11 日
Please post a new question in a new thread and not as comment to an answer. Otherwise the accepted answer status gets meaningless.
Siti Nor Arma Bt Mohd Zainun
Siti Nor Arma Bt Mohd Zainun 2013 年 3 月 19 日
ok thank you.

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by