From f3767d9531e849d8a77c4dea14b221eaedab11a7 Mon Sep 17 00:00:00 2001 From: yomguy Date: Thu, 17 Apr 2008 12:27:25 +0000 Subject: [PATCH] * Temporaly remove THD git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@187 5fc3e0e6-29bc-4d03-b52b-c088cb822bde --- CNAQ.m | 2 +- tools/plot_mes.m | 1 - tools/spectro2hd.m | 56 +++++++++++++++++++++++----------------------- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/CNAQ.m b/CNAQ.m index 4dc4991..052bd2d 100644 --- a/CNAQ.m +++ b/CNAQ.m @@ -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|Time/Frequency & THD'); +set(handles.analysis_domain,'String','Frequency|Time|Time/Frequency'); set(handles.in_on_off,'UserData',device); set(handles.save_button,'UserData',latency); diff --git a/tools/plot_mes.m b/tools/plot_mes.m index 01c6628..222e5f4 100644 --- a/tools/plot_mes.m +++ b/tools/plot_mes.m @@ -35,7 +35,6 @@ elseif domain == 2 % Time figure; subplot(2,1,1); - size(t) size(sig_mes) plot(t, sig_mes); %semilogx(t, sig_mes); diff --git a/tools/spectro2hd.m b/tools/spectro2hd.m index 17bb7f9..21f7629 100644 --- a/tools/spectro2hd.m +++ b/tools/spectro2hd.m @@ -12,9 +12,9 @@ function [S, f, t, f_1, h] = spectro2hd(s, f_s, f_min, f_max, n_harm) S = 20*log10(S); colormap(jet(ncmap)); -% size(t) -% size(f) -% size(S) + size(t) + size(f) + size(S) t_0 = t(1); t_n = t(length(t)); f_0 = f(1); @@ -25,7 +25,7 @@ function [S, f, t, f_1, h] = spectro2hd(s, f_s, f_min, f_max, n_harm) % figure(1); % img = imagesc(t, f, S); - mesh(t, f, S); + mesh(t, f, S); view([0,90]); shading interp; colorbar; @@ -35,30 +35,30 @@ function [S, f, t, f_1, h] = spectro2hd(s, f_s, f_min, f_max, n_harm) ylabel('Frequency (Hz)'); title(['Spectrogram (dB normalized)']); - for t_i=1:length(t) - f_1(t_i)=f_0*exp((t(t_i)/t_n)*log(f_n/f_0)); - for h_i=1:n_harm - f_i = h_i*f_1(t_i); - [r,c,V] = findnearest(f_i,f,0); - h(h_i,t_i)=S(r,t_i); - end - end - - colors = ['k';'r';'b';'g';'m';'c';'y']; - figure(2); - hold on; - leg = []; - for i=1:n_harm - semilogx(f_1,h(i,:),colors(i)); - leg = [leg;['Harmonic ' num2str(i)]]; - end - axis([f_0 f_n -120 0]); - set(gca,'XScale','log'); - xlabel('Frequency (Hz)'); - ylabel('Amplitude (dB)'); - title(['Modulus of the harmonic levels']); - legend(leg); - grid on; +% for t_i=1:length(t) +% f_1(t_i)=f_0*exp((t(t_i)/t_n)*log(f_n/f_0)); +% for h_i=1:n_harm +% f_i = h_i*f_1(t_i); +% [r,c,V] = findnearest(f_i,f,0); +% h(h_i,t_i)=S(r,t_i); +% end +% end +% +% colors = ['k';'r';'b';'g';'m';'c';'y']; +% figure(2); +% hold on; +% leg = []; +% for i=1:n_harm +% semilogx(f_1,h(i,:),colors(i)); +% leg = [leg;['Harmonic ' num2str(i)]]; +% end +% axis([f_0 f_n -120 0]); +% set(gca,'XScale','log'); +% xlabel('Frequency (Hz)'); +% ylabel('Amplitude (dB)'); +% title(['Modulus of the harmonic levels']); +% legend(leg); +% grid on; % pcolor(abs(S)); -- 2.39.5