time | Calls | line |
---|
| | 38 | function obj = init(obj,dimLength,dimLabels)
|
| | 39 | % INIT is called by both the dimension objects' constructor and
|
| | 40 | % tabular objects' loadobj method. In the latter case, because
|
| | 41 | % a default dimension object is already constructed, it is faster
|
| | 42 | % to 'initialize' through INIT rather reconstruct a new one
|
< 0.001 | 2 | 43 | obj.length = dimLength;
|
< 0.001 | 2 | 44 | if nargin == 3
|
< 0.001 | 2 | 45 | if isvector(dimLabels) && (numel(dimLabels) == dimLength)
|
< 0.001 | 2 | 46 | obj.hasLabels = true;
|
< 0.001 | 2 | 47 | obj.labels = obj.orientAs(dimLabels);
|
| | 48 | else
|
| | 49 | obj.throwIncorrectNumberOfLabels();
|
< 0.001 | 2 | 50 | end
|
< 0.001 | 2 | 51 | end
|
< 0.001 | 2 | 52 | end
|
Other subfunctions in this file are not included in this listing.