view examples/@FIRfilter/FIRfilter.m @ 14093:050bc580cb60 stable

doc: Various docstring improvements before 3.6.0 release. * NEWS, aspell-octave.en.pws, intro.txi, oop.txi, testfun.txi, tips.txi, FIRfilter.m, FIRfilter_aggregation.m, polynomial.m, polynomial_superiorto.m, usejava.m, pcg.m, pcr.m, nchoosek.m, validatestring.m, assert.m, weekday.m, cellfun.cc, error.cc, strfns.cc: Various docstring improvements before 3.6.0 release.
author Rik <octave@nomad.inbox5.com>
date Wed, 21 Dec 2011 19:46:57 -0800
parents f8b8ab529913
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