view m-toolbox/test/test_mfir_class.m @ 49:0bcdf74587d1 database-connection-manager

Cleanup
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:24:36 +0100
parents f0afece42f48
children
line wrap: on
line source

% TEST_MFIR_CLASS tests run on mfir class.
%
% M Hewitson 11-05-07
%
% $Id: test_mfir_class.m,v 1.5 2009/02/02 15:20:38 hewitson Exp $
%
function test_mfir_class()
  
  
  % Empty constructor
  f = mfir()
  
  % Lowpass from plist
  pl = plist('type', 'lowpass', 'Win', specwin('Kaiser', 10, 150), 'fs', 100, 'fc', 20);
  f  = mfir(pl)
  
  resp(f, plist('f1', 1,'f2', 50))
  
  % Highpass from plist
  pl = plist('type', 'highpass', 'Win', specwin('Kaiser', 10, 150), 'fs', 100, 'fc', 20);
  f  = mfir(pl)
  
  resp(f, plist('f1', 1,'f2', 50))
  
  % Bandpass from plist
  pl = plist('type', 'bandpass', 'fs', 100, 'order', 1024, 'fc', [0.1 10]);
  % pl.append('Win', specwin('Kaiser', 10, 250));
  f  = mfir(pl)
  
  resp(f, plist('f1', 0.0001,'f2', 50));
  
  % Bandreject from plist
  pl = plist('type', 'bandreject', 'fs', 100, 'order', 1024, 'fc', [0.1 10]);
  % pl.append('Win', specwin('Kaiser', 10, 250));
  f  = mfir(pl)
  
  resp(f, plist('f1', 0.0001, 'scale', 'log'));
  
end
% END