Mercurial > octave-nkf
comparison scripts/signal/freqz.m @ 18453:9d59bc3dc12d stable
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.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 13 Feb 2014 07:45:59 -0800 |
parents | 694e8f0b3862 |
children | 446c46af4b42 |
comparison
equal
deleted
inserted
replaced
18450:694e8f0b3862 | 18453:9d59bc3dc12d |
---|---|
16 ## along with Octave; see the file COPYING. If not, see | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}, @var{n}, "whole") | 20 ## @deftypefn {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}, @var{n}, "whole") |
21 ## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}) | |
22 ## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}) | |
23 ## @deftypefnx {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}, @var{n}) | |
21 ## @deftypefnx {Function File} {@var{h} =} freqz (@var{b}, @var{a}, @var{w}) | 24 ## @deftypefnx {Function File} {@var{h} =} freqz (@var{b}, @var{a}, @var{w}) |
22 ## @deftypefnx {Function File} {[@dots{}] =} freqz (@dots{}, @var{Fs}) | 25 ## @deftypefnx {Function File} {[@dots{}] =} freqz (@dots{}, @var{Fs}) |
23 ## @deftypefnx {Function File} {} freqz (@dots{}) | 26 ## @deftypefnx {Function File} {} freqz (@dots{}) |
24 ## | 27 ## |
25 ## Return the complex frequency response @var{h} of the rational IIR filter | 28 ## Return the complex frequency response @var{h} of the rational IIR filter |
26 ## whose numerator and denominator coefficients are @var{b} and @var{a}, | 29 ## whose numerator and denominator coefficients are @var{b} and @var{a}, |
27 ## respectively. The response is evaluated at @var{n} angular frequencies | 30 ## respectively. The response is evaluated at @var{n} angular frequencies |
28 ## between 0 and | 31 ## between 0 and |
29 ## @ifnottex | 32 ## @ifnottex |
30 ## 2*pi. | 33 ## 2*pi. |
31 ## @end ifnottex | 34 ## @end ifnottex |
32 ## @tex | 35 ## @tex |
33 ## $2\pi$. | 36 ## $2\pi$. |
34 ## @end tex | 37 ## @end tex |
35 ## | 38 ## |
36 ## @noindent | 39 ## @noindent |
37 ## The output value @var{w} is a vector of the frequencies. | 40 ## The output value @var{w} is a vector of the frequencies. |
38 ## | 41 ## |
39 ## If @var{a} is omitted, the denominator is assumed to be 1 (this | 42 ## If @var{a} is omitted, the denominator is assumed to be 1 (this |
40 ## corresponds to a simple FIR filter). | 43 ## corresponds to a simple FIR filter). |
41 ## | 44 ## |
42 ## If @var{n} is omitted, a value of 512 is assumed. | 45 ## If @var{n} is omitted, a value of 512 is assumed. |
43 ## | |
44 ## For fastest computation, @var{n} should factor into a small number of | 46 ## For fastest computation, @var{n} should factor into a small number of |
45 ## small primes. | 47 ## small primes. |
46 ## | 48 ## |
47 ## If the fourth argument, @qcode{"whole"}, is omitted the response is | 49 ## If the fourth argument, @qcode{"whole"}, is omitted the response is |
48 ## evaluated at frequencies between 0 and | 50 ## evaluated at frequencies between 0 and |
49 ## @ifnottex | 51 ## @ifnottex |
50 ## pi. | 52 ## pi. |
51 ## @end ifnottex | 53 ## @end ifnottex |
52 ## @tex | 54 ## @tex |
53 ## $\pi$. | 55 ## $\pi$. |
54 ## @end tex | 56 ## @end tex |
55 ## | 57 ## |
56 ## @code{freqz (@var{b}, @var{a}, @var{w})} | 58 ## @code{freqz (@var{b}, @var{a}, @var{w})} |
57 ## | 59 ## |
58 ## Evaluate the response at the specific frequencies in the vector @var{w}. | 60 ## Evaluate the response at the specific frequencies in the vector @var{w}. |
64 ## @var{Fs}. If you are evaluating the response at specific frequencies | 66 ## @var{Fs}. If you are evaluating the response at specific frequencies |
65 ## @var{w}, those frequencies should be requested in Hz rather than radians. | 67 ## @var{w}, those frequencies should be requested in Hz rather than radians. |
66 ## | 68 ## |
67 ## @code{freqz (@dots{})} | 69 ## @code{freqz (@dots{})} |
68 ## | 70 ## |
69 ## Plot the pass band, stop band and phase response of @var{h} rather | 71 ## Plot the magnitude and phase response of @var{h} rather than returning them. |
70 ## than returning them. | 72 ## |
73 ## @seealso{freqz_plot} | |
71 ## @end deftypefn | 74 ## @end deftypefn |
72 | 75 |
73 ## Author: jwe ??? | 76 ## Author: jwe ??? |
74 | 77 |
75 function [h_r, f_r] = freqz (b, a, n, region, Fs) | 78 function [h_r, f_r] = freqz (b, a, n, region, Fs) |