view m-toolbox/test/test_ao_dft.m @ 28:01b86b780ba7 database-connection-manager

Remove LTPDARepositoryManager implementation. Java code
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;

% Compute time-series
Nsecs = 1e3; % 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;

% Make FFT
tic
bxx = fft(b);
toc

% Make DFT
tic
dxx = dft(b);
toc

% Make DFT at a particular frequency
dsx = dft(b, plist('f', 1.137));

% Plot
iplot(bxx, dxx, dsx, plist('Markers', {'none', 'none', 'o'}));

iplot(bxx./dxx)