Mercurial > hg > ltpda
view m-toolbox/test/test_pzm_fngen.m @ 32:e22b091498e4 database-connection-manager
Update makeToolbox
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% Tests the fngen method of the pzmodel class. % % M Hewitson 18-04-08 % % $Id: test_pzm_fngen.m,v 1.2 2008/06/13 13:51:46 hewitson Exp $ % clear all; % pole zero model pzm = pzmodel(1, [pz(0.1, 2) pz(0.5, 40)] , [pz(.03) pz(1.55, 25)]); % Compute time-series Nsecs = 1e4; % Number of seconds desired swin = specwin('Kaiser', 10, 150); % Blending window b = fngen(pzm, plist('Win', swin, 'Nsecs', Nsecs)); % create time-series % Plot time-series iplot(b) %% Make spectra and compare to response sxx = pwelch(b, plist('Nfft', 100*b.data.fs, 'Scale', 'ASD')); axx = abs(resp(pzm, plist('f', sxx.data.x))); % iplot(axx./sxx, plist('YScales', {'All', 'lin'})) iplot(sxx, axx)