Mercurial > hg > ltpda
comparison m-toolbox/test/test_ao_fromVals.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 % TEST_AO_FROMVALS construct AOs in different ways | |
2 % | |
3 % Diepholz 19.09.2008 | |
4 % | |
5 % $Id: test_ao_fromVals.m,v 1.5 2011/08/15 13:53:20 hewitson Exp $ | |
6 % | |
7 function test_ao_fromVals() | |
8 | |
9 | |
10 % Make test AOs | |
11 | |
12 a1 = ao([1 2 3 4]); | |
13 if ~isa(a1.data, 'cdata') | |
14 error('The data object must de a cdata-object'); | |
15 end | |
16 | |
17 a2 = ao(1:12, randn(12,1)); | |
18 if ~isa(a2.data, 'xydata') | |
19 error('The data object must be a xydata-object'); | |
20 end | |
21 | |
22 a3 = ao(1:12, randn(12,1) + randn(12,1)*1i); | |
23 if ~isa(a3.data, 'xydata') | |
24 error('The data obejct must be a xydata-object'); | |
25 end | |
26 | |
27 a4 = ao(1:12, randn(12,1)); | |
28 if ~isa(a4.data, 'xydata') | |
29 error('The data object must be a xydata-object'); | |
30 end | |
31 | |
32 a5 = ao(1:12, randn(12,1) + randn(12,1)*1i); | |
33 if ~isa(a5.data, 'xydata') | |
34 error('The data object must be a xydata-object'); | |
35 end | |
36 | |
37 a6 = ao(randn(12,1), 32.47); | |
38 if ~isa(a6.data, 'tsdata') | |
39 error('The data object must be a tsdata-object'); | |
40 end | |
41 | |
42 a7 = ao([1:12], randn(12,1), plist); | |
43 if ~isa(a7.data, 'xydata') | |
44 error('The data object must be a xydata-object'); | |
45 end | |
46 | |
47 a8 = ao([1:12], randn(12,1), plist('type', 'xydata')); | |
48 if ~isa(a8.data, 'xydata') | |
49 error('The data object must be a xydata-object'); | |
50 end | |
51 | |
52 a9 = ao([1:12], randn(12,1), plist('type', 'tsdata')); | |
53 if ~isa(a9.data, 'tsdata') | |
54 error('The data object must be a tsdata-object'); | |
55 end | |
56 | |
57 a0 = ao([1:12], randn(12,1), plist('type', 'fsdata')); | |
58 if ~isa(a0.data, 'fsdata') | |
59 error('The data object must be a fsdata-object'); | |
60 end | |
61 | |
62 aa = ao(randn(12,1)); | |
63 if ~isa(aa.data, 'cdata') | |
64 error('The data object must be a cdata-object'); | |
65 end | |
66 | |
67 | |
68 | |
69 end | |
70 | |
71 |