This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 4. Example Code: axes1 and axes2 were created by guide. This is a pushbutton callback code that plots a sin function into the first set of axes and a straight line into the second set of axes. . Ht1 will be an array with the handles of all of the axes. Ht1(1) is the handle of axes 2 and Ht1(2) is the handle of axes1. I believe they are entered into Ht1 in the reverse order in which they were created. function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) t=0:.1:1; y=sin(pi*t); w=t; ht1=findobj( 'type' , 'axes' ) plot(ht1(1),t,w); plot(ht1(2),t,y);...
View Full Document
This note was uploaded on 09/16/2011 for the course ASE 201 taught by Professor Hayes during the Fall '07 term at University of Texas.
- Fall '07