]> git.parisson.com Git - cnaq.git/commitdiff
* Temporaly remove THD
authoryomguy <yomguy@5fc3e0e6-29bc-4d03-b52b-c088cb822bde>
Thu, 17 Apr 2008 12:27:25 +0000 (12:27 +0000)
committeryomguy <yomguy@5fc3e0e6-29bc-4d03-b52b-c088cb822bde>
Thu, 17 Apr 2008 12:27:25 +0000 (12:27 +0000)
git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@187 5fc3e0e6-29bc-4d03-b52b-c088cb822bde

CNAQ.m
tools/plot_mes.m
tools/spectro2hd.m

diff --git a/CNAQ.m b/CNAQ.m
index 4dc49914383766b1a4f0110c8c4b3673b29959c9..052bd2d0288fc0670db385097a921403d0a46220 100644 (file)
--- 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');
 \r
 set(handles.analysis_type,'String','Default');\r
 set(handles.analysis_method,'String','Transfert function|Deconvolution');\r
-set(handles.analysis_domain,'String','Frequency|Time|Time/Frequency & THD');\r
+set(handles.analysis_domain,'String','Frequency|Time|Time/Frequency');\r
 set(handles.in_on_off,'UserData',device);\r
 set(handles.save_button,'UserData',latency);\r
 \r
index 01c662821993e1be6fc178b8c0b9c011da5bd2de..222e5f4523998db180a12f253031158db440dd9f 100644 (file)
@@ -35,7 +35,6 @@ elseif domain == 2
     % Time\r
     figure;\r
     subplot(2,1,1);\r
-    size(t)\r
     size(sig_mes)\r
     plot(t, sig_mes);\r
     %semilogx(t, sig_mes);\r
index 17bb7f9c095a1090e8d18e5b787bdaf38fcccd89..21f7629f5768909b747a80f35287dbc43087bfab 100644 (file)
@@ -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));