comparison m-toolbox/test/test_pzm_fngen.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % Tests the fngen method of the pzmodel class.
2 %
3 % M Hewitson 18-04-08
4 %
5 % $Id: test_pzm_fngen.m,v 1.2 2008/06/13 13:51:46 hewitson Exp $
6 %
7 clear all;
8
9
10 % pole zero model
11 pzm = pzmodel(1, [pz(0.1, 2) pz(0.5, 40)] , [pz(.03) pz(1.55, 25)]);
12
13 % Compute time-series
14 Nsecs = 1e4; % Number of seconds desired
15 swin = specwin('Kaiser', 10, 150); % Blending window
16 b = fngen(pzm, plist('Win', swin, 'Nsecs', Nsecs)); % create time-series
17
18 % Plot time-series
19 iplot(b)
20
21 %% Make spectra and compare to response
22
23 sxx = pwelch(b, plist('Nfft', 100*b.data.fs, 'Scale', 'ASD'));
24 axx = abs(resp(pzm, plist('f', sxx.data.x)));
25 % iplot(axx./sxx, plist('YScales', {'All', 'lin'}))
26 iplot(sxx, axx)
27