From 2b665c10cd713b369150a6c3258c65876c469cb6 Mon Sep 17 00:00:00 2001 From: yomguy Date: Tue, 15 Apr 2008 12:18:11 +0000 Subject: [PATCH] * add time/frequency to the analysis menu git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@183 5fc3e0e6-29bc-4d03-b52b-c088cb822bde --- CNAQ.m | 100 +++++++++++++++++++++++------------------------ tools/plot_mes.m | 8 ++++ 2 files changed, 58 insertions(+), 50 deletions(-) diff --git a/CNAQ.m b/CNAQ.m index 9e30e41..4dc4991 100644 --- a/CNAQ.m +++ b/CNAQ.m @@ -34,7 +34,7 @@ function varargout = CNAQ(varargin) % Author: Guillaume Pellerin -% Last Modified by GUIDE v2.5 08-Apr-2008 18:19:43 +% Last Modified by GUIDE v2.5 08-Apr-2008 18:19:43 % CNAQ, by itself, creates a new CNAQ or raises the existing % singleton*. @@ -171,7 +171,7 @@ set(handles.channels_out,'String','1|1 2|1 2 3|1 2 3 4|1 2 3 4 5 6 7 8'); set(handles.analysis_type,'String','Default'); set(handles.analysis_method,'String','Transfert function|Deconvolution'); -set(handles.analysis_domain,'String','Frequency|Time'); +set(handles.analysis_domain,'String','Frequency|Time|Time/Frequency & THD'); set(handles.in_on_off,'UserData',device); set(handles.save_button,'UserData',latency); @@ -423,51 +423,51 @@ function load_Callback(hObject, eventdata, handless) % set(handles.time_value,'String',num2str(time)); - - -% --- Executes on selection change in analysis_type. -function analysis_type_Callback(hObject, eventdata, handles) -% hObject handle to analysis_type (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 analysis_type contents as cell array -% contents{get(hObject,'Value')} returns selected item from analysis_type - - -% --- Executes during object creation, after setting all properties. -function analysis_type_CreateFcn(hObject, eventdata, handles) -% hObject handle to analysis_type (see GCBO) -% eventdata reserved - to be defined in a future version of MATLAB -% handles empty - handles not created until after all CreateFcns called - -% Hint: popupmenu controls usually have a white background on Windows. -% See ISPC and COMPUTER. -if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) - set(hObject,'BackgroundColor','white'); -end - - -% --- Executes on selection change in analysis_domain. -function analysis_domain_Callback(hObject, eventdata, handles) -% hObject handle to analysis_domain (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 analysis_domain contents as cell array -% contents{get(hObject,'Value')} returns selected item from analysis_domain - - -% --- Executes during object creation, after setting all properties. -function analysis_domain_CreateFcn(hObject, eventdata, handles) -% hObject handle to analysis_domain (see GCBO) -% eventdata reserved - to be defined in a future version of MATLAB -% handles empty - handles not created until after all CreateFcns called - -% Hint: popupmenu controls usually have a white background on Windows. -% See ISPC and COMPUTER. -if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) - set(hObject,'BackgroundColor','white'); -end - - + + +% --- Executes on selection change in analysis_type. +function analysis_type_Callback(hObject, eventdata, handles) +% hObject handle to analysis_type (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 analysis_type contents as cell array +% contents{get(hObject,'Value')} returns selected item from analysis_type + + +% --- Executes during object creation, after setting all properties. +function analysis_type_CreateFcn(hObject, eventdata, handles) +% hObject handle to analysis_type (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: popupmenu controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end + + +% --- Executes on selection change in analysis_domain. +function analysis_domain_Callback(hObject, eventdata, handles) +% hObject handle to analysis_domain (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 analysis_domain contents as cell array +% contents{get(hObject,'Value')} returns selected item from analysis_domain + + +% --- Executes during object creation, after setting all properties. +function analysis_domain_CreateFcn(hObject, eventdata, handles) +% hObject handle to analysis_domain (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: popupmenu controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end + + diff --git a/tools/plot_mes.m b/tools/plot_mes.m index 69786df..01c6628 100644 --- a/tools/plot_mes.m +++ b/tools/plot_mes.m @@ -35,6 +35,8 @@ elseif domain == 2 % Time figure; subplot(2,1,1); + size(t) + size(sig_mes) plot(t, sig_mes); %semilogx(t, sig_mes); axis([0 t(length(t)) min(sig_mes)-0.01 max(sig_mes)+0.01]); @@ -56,6 +58,12 @@ elseif domain == 2 title(['Measured impulse response (group: ' group ', id: ' id ', channel : ' channel ')']); grid on; + +elseif domain == 3 + % Time - frequency + spectro2hd(sig_mes,f_s,f_min,f_max,5); + + end -- 2.39.5