Mercurial > hg > ltpda
view m-toolbox/test/test_ao_interp.m @ 4:e3c5468b1bfe database-connection-manager
Integrate with LTPDAPreferences
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +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