Mercurial > hg > ltpda
comparison m-toolbox/test/lisovfit/test_lisovfit_3.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 mc; | |
2 | |
3 % Make a TF | |
4 | |
5 fs = 10; | |
6 nsecs = 100000; | |
7 in = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', nsecs, 'yunits', 'm')); | |
8 | |
9 pzm = pzmodel(0.123, [0.001 2], [0.4 3]); | |
10 filt = miir(pzm, plist('fs', fs)); | |
11 filt.setIunits('m'); | |
12 filt.setOunits('V'); | |
13 | |
14 out = filter(in, filt) + ao(plist('tsfcn', '1e-7*randn(size(t))', 'fs', fs, 'nsecs', nsecs)); | |
15 | |
16 tf = tfe(in, out, plist('order', 2, 'nfft', fs*nsecs)); | |
17 | |
18 %% Make fitting models | |
19 | |
20 pzm0 = pzmodel(0.1, [0.001 1], [0.1 1]); | |
21 pzml = pzmodel(0.01, [0.0001 0.6], [0.01 0.6]); | |
22 pzmu = pzmodel(1, [0.1 10], [1 10]); | |
23 | |
24 pzmfit = lisovfit(tf(1,2), plist('PZM0', pzm0, 'pzml', pzml, 'pzmu', pzmu, 'delay', [0 0.01 100])); | |
25 | |
26 %% Plot | |
27 | |
28 iplot(tf(1,2), resp(pzmfit, plist('f', tf(1,2))) ) | |
29 | |
30 |