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

% TEST_AO_INTERP tests the interp method of AO class.
%
% M Hewitson 05-06-07
%
% $Id: test_ao_interp.m,v 1.12 2009/02/02 15:20:38 hewitson Exp $
%
function test_ao_interp()
  
  % Make fake AO from polyval
  nsecs = 100;
  fs    = 10;
  
  pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'sin(2*pi*1.733*t)');
  a1 = ao(pl);
  
  % Interpolate on a new time vector
  t = linspace(0, a1.data.nsecs - 1/a1.data.fs, 2*len(a1));
  pl = plist('vertices', t);
  
  b = interp(a1, pl);
  
  iplot([a1 b], plist('Markers', {'x', 'o'}, 'LineColors', {'k'}, 'XRanges', [0 1]));
  
  
  % Reproduce from history
  a_out = rebuild(b);
  
  iplot(a_out)
  plot(a_out.hist)
  
end
% END