view m-toolbox/test/lisovfit/test_lisovfit_3.m @ 16:91f21a0aab35 database-connection-manager

Update utils.jquery * * * Update utils.jmysql.getsinfo
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

mc;

% Make a TF

fs = 10;
nsecs = 100000;
in = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', nsecs, 'yunits', 'm'));

pzm = pzmodel(0.123, [0.001 2], [0.4 3]);
filt = miir(pzm, plist('fs', fs));
filt.setIunits('m');
filt.setOunits('V');

out = filter(in, filt) + ao(plist('tsfcn', '1e-7*randn(size(t))', 'fs', fs, 'nsecs', nsecs));

tf = tfe(in, out, plist('order', 2, 'nfft', fs*nsecs));

%% Make fitting models

pzm0 = pzmodel(0.1,  [0.001 1], [0.1 1]);
pzml = pzmodel(0.01, [0.0001 0.6], [0.01 0.6]);
pzmu = pzmodel(1,    [0.1 10], [1 10]);

pzmfit = lisovfit(tf(1,2), plist('PZM0', pzm0, 'pzml', pzml, 'pzmu', pzmu, 'delay', [0 0.01 100]));

%% Plot

iplot(tf(1,2), resp(pzmfit, plist('f', tf(1,2))) )