From 4bff1bb945375e9be7b037b5116fb722d9956921 Mon Sep 17 00:00:00 2001 From: yomguy Date: Tue, 8 Apr 2008 13:24:38 +0000 Subject: [PATCH] * Fixed f_s value request for the monitor * Full english in plots git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@175 5fc3e0e6-29bc-4d03-b52b-c088cb822bde --- tools/monitor.m | 3 ++- tools/plot_main.m | 2 +- tools/plot_mes.m | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/tools/monitor.m b/tools/monitor.m index 16c716d..0160c59 100644 --- a/tools/monitor.m +++ b/tools/monitor.m @@ -3,7 +3,8 @@ function monitor(handles) device = get(handles.in_on_off,'UserData'); buffer = 8192; window = hanning(buffer); - f_s = get_fs(handles); + fs_id = get(handles.f_s,'Value'); + f_s = get_fs(fs_id); time = buffer/f_s; t = [0:1/f_s:time-1/f_s]; diff --git a/tools/plot_main.m b/tools/plot_main.m index 5c247ba..38b3d43 100644 --- a/tools/plot_main.m +++ b/tools/plot_main.m @@ -8,8 +8,8 @@ function plot_main(handles) f_min = str2double(get(handles.f_gen_min,'String')); f_max = str2double(get(handles.f_gen_max,'String')); fs_id = get(handles.f_s,'Value'); - nb_id = get(handles.nbits,'Value'); f_s = get_fs(fs_id); + nb_id = get(handles.nbits,'Value'); nbits = get_nbits(nb_id); size_sig_mes = size(sig_mes); n_col_sig_mes = size_sig_mes(2); diff --git a/tools/plot_mes.m b/tools/plot_mes.m index 0634c8f..06d3ce2 100644 --- a/tools/plot_mes.m +++ b/tools/plot_mes.m @@ -1,4 +1,4 @@ -function plot_mes(t, f, f_s, f_min, f_max, sig_exc, sig_mes, rep_imp_mes, spec_mes, spec_exc, id, voice, group, comment, i); +function plot_mes(t, f, f_s, f_min, f_max, sig_exc, sig_mes, rep_imp_mes, spec_mes, spec_exc, id, channel, group, comment, i); len_spec_mes = length(spec_mes); %spec = spec(1:len_spec); @@ -10,9 +10,9 @@ plot(t, sig_mes); %semilogx(t, sig_mes); axis([0 t(length(t)) min(sig_mes)-0.01 max(sig_mes)+0.01]); %axis([1 t(length(t)) min(sig_mes)-0.01 max(sig_mes)+0.01]); -xlabel('Temps (s)'); +xlabel('Time (s)'); ylabel('Amplitude'); -title(['Signal temporel mesuré (groupe: ' group ', id: ' id ', voie : ' voice ')']); +title(['Measured temporal signal (group: ' group ', id: ' id ', channel : ' channel ')']); grid on; subplot(2,1,2); @@ -22,9 +22,9 @@ t_ri = [(-len_ri)/(2*f_s):1/f_s:(len_ri)/(2*f_s)]; t_ri = t_ri(1:length(t_ri)-1); plot(t_ri,rep_imp_mes); axis([-t_ri(len_ri) t_ri(len_ri) min(rep_imp_mes)-0.01 max(rep_imp_mes)+0.01]); -xlabel('Temps (s)'); +xlabel('Time (s)'); ylabel('Amplitude'); -title(['Réponse impulsionnelle mesurée (groupe: ' group ', id: ' id ', voie : ' voice ')']); +title(['Measured impulse response (group: ' group ', id: ' id ', channel : ' channel ')']); grid on; @@ -39,9 +39,9 @@ subplot(2,1,1); spec_mes_log = 10*log10(abs(spec_mes)); semilogx(f, spec_mes_log); axis([f_min f_max min(spec_mes_log(f_min_ind:f_max_ind-1000))-6 max(spec_mes_log(f_min_ind:f_max_ind))+6]); -xlabel('Fréquence (Hz)'); +xlabel('Frequency (Hz)'); ylabel('Amplitude (dB)'); -title(['Module de la fonction de transfert (groupe: ' group ', id: ' id ', voie : ' voice ')']); +title(['Modulus of the transfert function (group: ' group ', id: ' id ', channel : ' channel ')']); grid on; subplot(2,1,2); @@ -53,5 +53,5 @@ axis([f_min f_max min(ang(f_min_ind:f_max_ind)) max(ang(f_min_ind:f_max_ind))]); grid on; xlabel('Fréquence (Hz)'); ylabel('Phase (rad)'); -title(['Phase de la fonction de transfert (groupe: ' group ', id: ' id ', voie : ' voice ')']); +title(['Phasis of the transfert function (group: ' group ', id: ' id ', channel : ' channel ')']); -- 2.39.5