view m-toolbox/test/test_sin.m @ 16:91f21a0aab35
database-connection-manager
Update utils.jquery
* * *
Update utils.jmysql.getsinfo
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_SIN test sin() operator for analysis objects.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: TEST_SIN Test sin() operator for analysis objects with
% tsdata, fsdata cdata and xydata
%
% CALL: test_sin;
%
% HISTORY: 22-05-2007 Diepholz
% Creation.
%
% VERSION: % $Id: test_sin.m,v 1.4 2009/02/02 15:20:37 hewitson Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function test_sin()
% Create tsdata with a sinewave
pl = plist('fs', 100, 'nsecs', 5, 'waveform', 'sine wave', 'f', 1.23, 'phi', 30);
ts_data = ao(pl);
% Create cdata with a 3x3 Matrix
matr = [1 2 3; 4 5 6; 7 8 9];
c_data = cdata(matr);
c_data = ao(c_data);
% Create xydata with a exp function
x = 1:1000;
y = exp(x.^.5/2);
xy_data = xydata(x,y);
xy_data = ao(xy_data);
% Some tests
ao_out = sin(ts_data);
ao_out = sin(ts_data, ts_data, ts_data);
% Create different parameter lists to control the sin test
pl1 = plist('xdata', 't', 'ydata', 'x');
ao_out = sin(ts_data, pl1);
pl2 = plist('xdata', 'x', 'ydata', 'y');
ao_out = sin(xy_data, pl2);
end