Mercurial > hg > octave-nkf
view examples/@FIRfilter/FIRfilter.m @ 14342:2cd56a5e3a66 stable
new tests
* ols.m: New tests.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 07 Feb 2012 11:41:33 -0500 |
parents | 050bc580cb60 |
children |
line wrap: on
line source
## -*- texinfo -*- ## @deftypefn {Function File} {} FIRfilter () ## @deftypefnx {Function File} {} FIRfilter (@var{p}) ## Create a FIR filter with polynomial @var{p} as coefficient vector. ## @end deftypefn function f = FIRfilter (p) f.polynomial = []; if (nargin == 0) p = @polynomial ([1]); elseif (nargin == 1) if (!isa (p, "polynomial")) error ("FIRfilter: expecting polynomial as input argument"); endif else print_usage (); endif f = class (f, "FIRfilter", p); endfunction