# HG changeset patch # User Rik # Date 1392306359 28800 # Node ID 9d59bc3dc12d82f2353ff7a48440b90e29baa90e # Parent 694e8f0b3862c53c84af76529950358796fcdcc4 doc: Update docstrings for freqz, freqz_plot. * freqz.m: List alternative calling forms. Eliminate extra space caused by expansion in ifnottex macro. Remove mention of plotting stop band. Add seealso link to freqz_plot. * freqz_plot.m: Use freq_norm as the name for the third input to match the code. Remove mention of plotting stop band. Add seealso link to freqz. diff -r 694e8f0b3862 -r 9d59bc3dc12d scripts/signal/freqz.m --- a/scripts/signal/freqz.m Thu Feb 13 00:00:10 2014 -0500 +++ b/scripts/signal/freqz.m Thu Feb 13 07:45:59 2014 -0800 @@ -18,6 +18,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}, @var{n}, "whole") +## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}) +## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}) +## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}, @var{n}) ## @deftypefnx {Function File} {@var{h} =} freqz (@var{b}, @var{a}, @var{w}) ## @deftypefnx {Function File} {[@dots{}] =} freqz (@dots{}, @var{Fs}) ## @deftypefnx {Function File} {} freqz (@dots{}) @@ -27,10 +30,10 @@ ## respectively. The response is evaluated at @var{n} angular frequencies ## between 0 and ## @ifnottex -## 2*pi. +## 2*pi. ## @end ifnottex ## @tex -## $2\pi$. +## $2\pi$. ## @end tex ## ## @noindent @@ -40,17 +43,16 @@ ## corresponds to a simple FIR filter). ## ## If @var{n} is omitted, a value of 512 is assumed. -## ## For fastest computation, @var{n} should factor into a small number of ## small primes. ## ## If the fourth argument, @qcode{"whole"}, is omitted the response is ## evaluated at frequencies between 0 and ## @ifnottex -## pi. +## pi. ## @end ifnottex ## @tex -## $\pi$. +## $\pi$. ## @end tex ## ## @code{freqz (@var{b}, @var{a}, @var{w})} @@ -66,8 +68,9 @@ ## ## @code{freqz (@dots{})} ## -## Plot the pass band, stop band and phase response of @var{h} rather -## than returning them. +## Plot the magnitude and phase response of @var{h} rather than returning them. +## +## @seealso{freqz_plot} ## @end deftypefn ## Author: jwe ??? diff -r 694e8f0b3862 -r 9d59bc3dc12d scripts/signal/freqz_plot.m --- a/scripts/signal/freqz_plot.m Thu Feb 13 00:00:10 2014 -0500 +++ b/scripts/signal/freqz_plot.m Thu Feb 13 07:45:59 2014 -0800 @@ -18,10 +18,13 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} freqz_plot (@var{w}, @var{h}) -## @deftypefnx {Function File} {} freqz_plot (@var{w}, @var{h}, @var{freq_hz}) -## Plot the pass band, stop band and phase response of @var{h}. If the -## optional @var{freq_norm} argument is true, the frequency vector @var{w} -## is in units of normalized radians and the x-axis is labeled as such. +## @deftypefnx {Function File} {} freqz_plot (@var{w}, @var{h}, @var{freq_norm}) +## Plot the magnitude and phase response of @var{h}. +## +## If the optional @var{freq_norm} argument is true, the frequency vector +## @var{w} is in units of normalized radians. If @var{freq_norm} is false, or +## not given, then @var{w} is measured in Hertz. +## @seealso{freqz} ## @end deftypefn ## Author: Paul Kienzle @@ -43,7 +46,7 @@ phase = unwrap (arg (h)); if (freq_norm) - x_label = "Normalized Frequency (\\times\\pi rad/sample)"; + x_label = 'Normalized Frequency (\times\pi rad/sample)'; else x_label = "Frequency (Hz)"; endif