view m-toolbox/test/xml_tests/test_ao.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 (2011-12-07) |
parents |
f0afece42f48 |
children |
|
line source
clear all;
%% AO waveform
a1 = ao(plist('waveform', 'sine wave', 'f', 1, 'phi', 0, 'nsecs', 3600, 'fs', 10));
% a1 = attachm(a1, mfilename);
xmlfile = 'ao_wafeform.xml';
save(a1, xmlfile);
% load
a2 = ao(xmlfile);
if a1 ~= a2
error('### aos are not the same')
end
%% AO tsdata
plt0 = plist( 'timeformat', 'yyyy-mm-dd HH:MM:SS.FFF',...
'timezone', 'UTC', ...
'utc_epoch_milli', 0);
a1 = ao(plist('tsfcn', 'randn(size(t))', 'nsecs', 30, 'fs', fs, 't0', time(plt0)));
%% AO cdata
a1 = ao([1+3i -2 3; 4 5-3i -6; -7 8 9+1i]);
%% AO fsdata
fs = 10;
f = 1:1000;
xx = randn(size(f));
a1 = ao(fsdata(f,xx,fs));
%% AO xydata
x = 1:10;
y = exp(x.^.5/2);
a1 = ao(xydata(x,y));