freqz_plot alterations
Daniel J Sebald <[email protected]> Thu, 05 Aug 2004 00:43:37 -0500
| Newsgroups | gmane.comp.gnu.octave.graphics |
|---|---|
| Message-ID | <[email protected]> |
For anyone interested, attached are some slight alterations to the freqz_plot.m file. The three plots are made to have the same height and the tics for the phase angle are made more congruous with 5, 15, 30, 45, 60, etc (Being able to specify a sample rate, i.e., non-normalized frequency would be nice, but probably not compatible.) Dan
freqz_plot.diff
(text/plain, 1.2 KB)
0a1,11 > ## EXPERIMENTAL CODE!!! by Dan Sebald. (Aug 5, 2004) > ## > ## This file is NOT part of the Octave distribution. > ## > ## This file is a variation of the freqz_plot.m file from version > ## 2.1.57. The plot locations are changed so that all plot heights > ## are the same. Also, the phase plot attempts to choose a more > ## appropriate tic for angles. > ## > ## ===================================================================== > ## 47a59,62 > gset size 1,0.26; > gset origin 0,0.72; > gset bmargin 0; > gset tmargin 0; 55c70 < subplot (312); --- > gset origin 0,0.42; 59d73 < gset tmargin 0; 68c82 < subplot (313); --- > gset origin 0,0.12; 71a86,103 > phasediff = (max (phase) - min (phase))*360/(2*pi); > if (phasediff < 5) > gset ytics autofreq; > elseif (phasediff < 30) > gset ytics 5; > elseif (phasediff < 90) > gset ytics 15; > elseif (phasediff < 180) > gset ytics 30; > elseif (phasediff < 240) > gset ytics 45; > elseif (phasediff < 360) > gset ytics 60; > elseif (phasediff < 540) > gset ytics 90; > else > gset ytics autofreq; > endif 88a121,122 > gset bmargin; > gset ytics autofreq;