view m-toolbox/test/test_ao_zeropad.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



% Compute time-series
Nsecs = 1e2; % Number of seconds desired
fs    = 10;

s = ao(plist('tsfcn', 'sin(2*pi*1.137*t)', 'fs', fs, 'Nsecs', Nsecs));
n = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'Nsecs', Nsecs));
b = n + s;

% Zero pad x3
bz = zeropad(b, plist('Factor', 10));

% Zero pad with N samples
cz = zeropad(b, plist('N', 100));

iplot(b,bz,cz)

% Spectra
bxx = abs(fft(b)).^2;
bzxx = abs(fft(bz)).^2;
czxx = abs(fft(cz)).^2;

iplot(bzxx, bxx, czxx)