colours for LSP PDFs
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 13 Nov 2010 02:40:10 +0000 (02:40 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 13 Nov 2010 02:40:10 +0000 (02:40 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@223 01035d8c-6547-0410-b346-abe4f91aad63

codec2/octave/lsp_pdf.m

index 6617066e3db578832d6dd2617249be80e3c7c4d5..28184096013d3f75113c98c1e136787a03d51778 100644 (file)
@@ -14,7 +14,11 @@ function lsp_pdf(lsp)
   hold on;
   for i=2:c
     [x,y] = hist(lsp(:,i),100);
-    legend = sprintf(";%d;",i);
+    if (mod(i,2))
+        legend = sprintf(";%d;",i);
+    else
+        legend = sprintf("1;%d;",i);
+    endif
     plot(y*4000/pi,x,legend);
   endfor
   hold off;
@@ -26,24 +30,24 @@ function lsp_pdf(lsp)
   clf;
   subplot(211)
   [x,y] = hist(lsp(:,1),100);
-  plot(y,x,";1;");
+  plot(y*4000/pi,x,"1;1;");
   hold on;
   for i=2:5
     [x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
-    legend = sprintf(";%d;",i);
-    plot(y,x,legend);
+    legend = sprintf("%d;%d;",i,i);
+    plot(y*4000/pi,x,legend);
   endfor
   hold off;
   grid;
 
   subplot(212)
   [x,y] = hist(lsp(:,6)-lsp(:,5),100);
-  plot(y,x,";6;");
+  plot(y*4000/pi,x,"1;6;");
   hold on;
   for i=7:c
     [x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
-    legend = sprintf(";%d;",i);
-    plot(y,x,legend);
+    legend = sprintf("%d;%d;",i-5,i);
+    plot(y*4000/pi,x,legend);
   endfor
   hold off;
   grid;