1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
v(1) = get(handles.popupmenu2,'value')
v(2) = get(handles.popupmenu2,'value')
v(3) = get(handles.popupmenu2,'value')
if v(1)==1
cycle_NEDC = get(handles.popupmenu2,'string')
load Cycle_NEDC
Data_FFT
load cycle
plot(handles.axes4,cy(1,:),cy(2,:),'r')
if w(1)==1
plot(handles.axes4,cy(1,:),cy(2,:),'r')
end
if w(2)==2
plot(handles.axes4,cy(1,:),cy(3,:),'r')
end
end
if v(2)==2
cycle2 = get(handles.popupmenu2,'string')
cycle2=[1 1 2 3;4 5 6 7]
plot(handles.axes4,cycle2(1,:),cycle2(2,:))
end
if v(3)==3
cycle3 = get(handles.popupmenu2,'string')
cycle3=[5 9 8 6;2 2 8 9]
plot(handles.axes4,cycle3(1,:),cycle3(2,:))
end
function popupmenu5_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu5 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu5
global handles
w(1)= get(handles.popupmenu5,'value')
w(2)= get(handles.popupmenu5,'value')
if w(1)==1
cycle_NEDC = get(handles.popupmenu5,'string')
%Data_FFT
%load cycle
plot(handles.axes4,cy(1,:),cy(2,:),'r')
%set(handles.axes4,cy(1,:),cy(2,:),'r')
end
if w(2)==2
cycle_NEDC = get(handles.popupmenu5,'string')
%load Cycle_NEDC
%DATA_FFT
%load cycle
plot(handles.axes4,cy(1,:),cy(3,:),'r')
%set(handles.axes4,cy(1,:),cy(3,:),'r')
end |