diff scripts/signal/freqz_plot.m @ 6746:a8105a726e68

[project @ 2007-06-19 08:18:34 by dbateman]
author dbateman
date Tue, 19 Jun 2007 08:18:34 +0000
parents 2110cc251779
children 93c65f2a5668
line wrap: on
line diff
--- a/scripts/signal/freqz_plot.m
+++ b/scripts/signal/freqz_plot.m
@@ -38,13 +38,15 @@
     maxmag = max (mag);
 
     subplot (3, 1, 1);
-    plot (w, mag, ";Pass band (dB);");
+    plot (w, mag);
     grid ("on");
+    legend("Pass band (dB)");
     axis ([w(1), w(n), maxmag-3, maxmag], "labely");
 
     subplot (3, 1, 2);
-    plot (w, mag, ";Stop band (dB);");
+    plot (w, mag);
     grid ("on");
+    legend ("Stop band (dB)");
     if (maxmag - min (mag) > 100)
       axis ([w(1), w(n), maxmag-100, maxmag], "labely");
     else
@@ -52,8 +54,9 @@
     endif
 
     subplot (3, 1, 3);
-    plot (w, phase*360/(2*pi), ";Phase (degrees);");
+    plot (w, phase*360/(2*pi));
     grid ("on");
+    legend ("Phase (degrees)");
     xlabel ("Frequency");
     axis ([w(1), w(n)], "autoy", "label");