File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 41
41
assert(isempty(d1 .unit ));
42
42
assert(d1 .samplingInterval == 200 );
43
43
assert(isempty(d1 .offset ));
44
-
44
+
45
+ axis = d1 .axis(10 , 0 );
46
+ assert(axis(1 ) == 0 );
47
+ assert(length(axis ) == 10 );
48
+ assert(axis(end ) == (length(axis ) - 1 ) * d1 .samplingInterval );
49
+
45
50
d1.label = ' foo' ;
46
51
d1.unit = ' mV' ;
47
52
d1.samplingInterval = 325 ;
52
57
assert(d1 .samplingInterval == 325 );
53
58
assert(d1 .offset == 500 );
54
59
60
+ axis = d1 .axis(10 , 0 );
61
+ assert(axis(1 ) == d1 .offset );
62
+ assert(length(axis ) == 10 );
63
+ assert(axis(end ) == (length(axis ) - 1 ) * d1 .samplingInterval + d1 .offset );
64
+
65
+ assert(d1 .position_at(0 ) == d1 .offset );
66
+ assert(d1 .position_at(9 ) == d1 .offset + 9 * d1 .samplingInterval );
67
+
55
68
d1.label = ' ' ;
56
69
d1.unit = ' ' ;
57
70
d1.offset = 0 ;
60
73
assert(isempty(d1 .unit ));
61
74
assert(d1 .samplingInterval == 325 );
62
75
assert(d1 .offset == 0 );
76
+
77
+ axis = d1 .axis(10 , 0 );
78
+ assert(axis(1 ) == 0 );
79
+ assert(axis(end ) == (length(axis ) - 1 ) * d1 .samplingInterval + d1 .offset );
80
+
81
+ assert(d1 .position_at(0 ) == d1 .offset );
82
+ assert(d1 .position_at(9 ) == d1 .offset + 9 * d1 .samplingInterval );
63
83
end
64
84
65
85
function [] = test_range_dimension( varargin )
You can’t perform that action at this time.
0 commit comments