view m-toolbox/test/test_pzm_fngen.m @ 52:daf4eab1a51e database-connection-manager tip

Fix. Default password should be [] not an empty string
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:29:47 +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)