view m-toolbox/test/testing_xml.m @ 7:1e91f84a4be8
database-connection-manager
Make ltpda_up.retrieve work with java.sql.Connection objects
author |
Daniele Nicolodi <nicolodi@science.unitn.it> |
date |
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05) |
parents |
f0afece42f48 |
children |
|
line source
% Test saving AO to xml
%
%
% $Id: testing_xml.m,v 1.23 2009/07/21 05:16:29 hewitson Exp $
%
function testing_xml()
% 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);
% Make LPSD of each
% Window function
w = specwin('Kaiser', 1000, 250);
% use lpsd
a3 = psd(a1);
a4 = psd(a2);
% multiply
a5 = a3.*a4;
iplot(a5)
plot(a5.hist)
% Save to XML
file_name = 'a5.xml';
save(a5, file_name);
% Load
file_name = 'a5.xml';
b = ao(file_name);
iplot(b)
plot(b.hist)
% Rebuild from history
a_out = rebuild(b);
plot(a_out.hist)
iplot(a_out)
end