view examples/@FIRfilter/FIRfilter.m @ 12747:901d466ee55a stable release-3-4-1

Version 3.4.1 released. * configure.ac (AC_INIT): Version is now 3.4.1. (OCTAVE_API_VERSION_NUMBER): Now 45. (OCTAVE_RELEASE_DATE): Now 2011-06-15.
author John W. Eaton <jwe@octave.org>
date Wed, 15 Jun 2011 10:35:37 -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)

  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