view m-toolbox/test/test_miir_class.m @ 38:3aef676a1b20
database-connection-manager
Keep backtrace on error
author |
Daniele Nicolodi <nicolodi@science.unitn.it> |
date |
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05) |
parents |
f0afece42f48 |
children |
|
line source
% Test the constructor for miir objects.
%
% M Hewitson 11-02-07
%
% $Id: test_miir_class.m,v 1.20 2009/02/02 15:20:38 hewitson Exp $
%
function test_miir_class()
% Example 1 - empty
f = miir()
% Example 2 - standard types
% bandpass
pl = plist('type', 'bandpass', 'fs', 1000, 'fc', [50 100], 'order', 3);
f1 = miir(pl);
% highpass
pl = plist('type', 'highpass', 'fs', 1000, 'fc', 60, 'order', 3);
f2 = miir(pl);
% Plot response
pl = plist('f1', 10, 'f2', 200);
a1 = resp(f1, pl);
a2 = resp(f2, pl);
a3 = a2.*a1;
a4 = a2./a1;
iplot(a1, a2, a3, a4)
% Plot history
plot([a3.hist a4.hist])
end