Mercurial > hg > ltpda
view m-toolbox/test/test_stuttgart_diff_acc.m @ 33:5e7477b94d94 database-connection-manager
Add known repositories list to LTPDAPreferences
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% function test_stuttgart_diff_acc() % TEST_STUTTGART_DIFF_ACC % %% Input AOs pl = plist(); pl = append(pl, param('nsecs', 10)); pl = append(pl, param('fs', 100)); pl = append(pl, param('tsfcn', 'randn(size(t))')); X1 = ao('X1.xml'); X12 = ao('X12.xml'); Fsus = ao('Fsus.xml'); %% Plot time-series pl = plist(param('times', [10 20000])); X1 = split(X1, pl); X12 = split(X12, pl); Fsus = split(Fsus, pl); figure plot([X1 X12 Fsus]) % ltpda_xaxis(0, 100) %% Detrend pl = plist(param('N', 0)); X1dt = ltpda_polydetrend(X1, pl); X12dt = ltpda_polydetrend(X12, pl); Fsusdt = ltpda_polydetrend(Fsus, pl); figure plot([X1dt X12dt Fsusdt]) % ltpda_xaxis(0, 100) %% Call diff_acc [X1, X2, X3, P] = ltpda_diff_acc(X1dt, X12dt, Fsusdt, plist()); pl = plist(param('times', [20 20000])); X1 = split(X1, pl); X2 = split(X2, pl); X3 = split(X3, pl); %% Plots figure plot(X3.hist) %% Make PSD estimates w = specwin('Hanning', 10); % pl = plist(param('Nfft', 3600)); pl = append(pl, param('Win', w)); X3xx = ltpda_pwelch(X3, pl); figure plot(X3xx) % END