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

function test_ltpda_chkts()

% TEST_LTPDA_CHKTS test script for ltpda_chkts.
% 
% M Hewitson 02-05-07
% 
% $Id: test_ltpda_chkts.m,v 1.2 2008/09/19 14:03:50 ingo Exp $
% 

%% Make evenly sampled data
Nsecs = 10;
fs    = 100;
t     = linspace(0, Nsecs-1/fs, Nsecs*fs);
x     = randn(size(t));

ts = tsdata(t,x);
a1 = ao(ts);
a1 = setName(a1, 'evenly sampled data');

% check these
if ltpda_chkts(a1)
  disp(sprintf('* ao(%s) passed', get(a1, 'name')));
end

%% Make un-evenly sampled data
Nsecs = 10;
fs    = 100;
N     = Nsecs*fs;

% grow time vector with some noise on sample time
t = 0;
for j=2:N
  nt = t(j-1) + 1/fs + 0.000001*rand;
  t = [t nt];
end

x = randn(size(t));

ts = tsdata(t,x);
a2 = ao(ts);
a2 = setName(a2, 'unevenly sampled data');

% check these
if ltpda_chkts(a2)
  disp(sprintf('* ao(%s) passed', get(a2, 'name')));
else
  disp(sprintf('* ao(%s) failed', get(a2, 'name')));
end


% END