view examples/@FIRfilter/FIRfilter_aggregation.m @ 14393:ba4d6343524b stable release-3-6-1

Version 3.6.1 released. * configure.ac (AC_INIT): Version is now 3.6.1. (OCTAVE_RELEASE_DATE): Release date is now 2012-02-22.
author John W. Eaton <jwe@octave.org>
date Wed, 22 Feb 2012 14:39:41 -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)

  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