time | Calls | line |
---|
| | 197 | function obj = selectFrom(obj,toSelect)
|
| | 198 | %SELECTFROM Return a subset of a tableDimProps for the specified indices.
|
| | 199 | % The indices might be out of order or repeated, that's OK.
|
0.847 | 38264 | 200 | obj = obj.selectFrom@matlab.internal.tabular.private.tabularDimension(toSelect);
|
| | 201 |
|
| | 202 | % Var-based or properties need to be selected. Make sure they stay
|
| | 203 | % row vectors, even if selectFrom is empty.
|
0.165 | 38264 | 204 | if obj.hasDescrs, obj.descrs = obj.descrs(1,toSelect); end
|
0.005 | 38264 | 205 | if obj.hasUnits, obj.units = obj.units(1,toSelect); end
|
0.003 | 38264 | 206 | if obj.hasContinuity, obj.continuity = obj.continuity(1,toSelect); end
|
0.004 | 38264 | 207 | if obj.hasCustomProps
|
| | 208 | p = fieldnames(obj.customProps);
|
| | 209 | for i = 1:numel(p)
|
| | 210 | if ~isempty(obj.customProps.(p{i})) % leave alone props that are []
|
| | 211 | obj.customProps.(p{i}) = obj.customProps.(p{i})(1,toSelect);
|
| | 212 | end
|
| | 213 | end
|
0.001 | 38264 | 214 | end
|
0.006 | 38264 | 215 | end
|
Other subfunctions in this file are not included in this listing.