view examples/@FIRfilter/FIRfilter_aggregation.m @ 12770:3666e8e6f96e stable release-3-4-2

Version 3.4.2 released. * configure.ac (AC_INIT): Version is now 3.4.2. (OCTAVE_RELEASE_DATE): Now 2011-06-24.
author John W. Eaton <jwe@octave.org>
date Fri, 24 Jun 2011 10:36:40 -0400
parents f8b8ab529913
children 050bc580cb60
line wrap: on
line source

## -*- texinfo -*-
## @deftypefn {Function File} {} FIRfilter ()
## @deftypefnx {Function File} {} FIRfilter (@var{p})
## Creates an FIR filter with polynomial @var{p} as
## coefficient vector.
##
## @end deftypefn

function f = FIRfilter (p)

  if (nargin == 0)
    f.polynomial = @polynomial ([1]);
  elseif (nargin == 1)
    if (isa (p, "polynomial"))
      f.polynomial = p;
    else
      error ("FIRfilter: expecting polynomial as input argument");
    endif
  else
    print_usage ();
  endif
  f = class (f, "FIRfilter");
endfunction