comparison m-toolbox/test/fsdata_class_test.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function fsdata_class_test()
2 % Test script for frequency-series (fsdata) class.
3 %
4 %
5 % M Hewitson 31-01-07
6 %
7 % $Id: fsdata_class_test.m,v 1.7 2008/09/05 14:18:36 hewitson Exp $
8 %
9
10
11 %% Test constructor 1
12
13 fsd = fsdata()
14
15 %% Test constructor 2
16
17 fsd = fsdata(randn(1000,1))
18
19 %% Test constructor 3
20
21 fs = 1000;
22 f = linspace(0, fs/2, 1000);
23 xx = randn(1000,1);
24
25 fsd = fsdata(f,xx,fs)
26
27 %% Test constructor 4
28
29 fs = 1000;
30 x = randn(1,1000);
31
32 fsd = fsdata(xx,fs);
33
34 fsd = fsd.setXunits('Hz');
35 fsd = fsd.setYunits('V Hz^-0.5');
36 fsd
37
38