view m-toolbox/test/test_ltpda_lincom.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line source

% Test script for ltpda_lincom.
%
% M Hewitson 14-02-07
%
% $Id: test_ltpda_lincom.m,v 1.17 2009/02/19 08:18:55 hewitson Exp $
%
function test_ltpda_lincom()
  
  
  % Make test AOs
  nsecs = 10;
  fs    = 1000;
  
  pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'sin(2*pi*7.433*t) + randn(size(t))');
  
  a1 = ao(pl);
  a2 = ao(pl);
  a3 = ao(pl);
  
  % Make linear combination
  
  b = lincom(a1, a2, a3, ao([1 2 3]));
  
  iplot(b)
  plot(b.hist)
  
  
  % Reproduce from history
  a_out = rebuild(b);
  
  iplot(a_out)
  plot(a_out.hist)
  
end

% END