diff --git a/+types/+util/+dynamictable/getRow.m b/+types/+util/+dynamictable/getRow.m index 97850f21..1fe4baf8 100644 --- a/+types/+util/+dynamictable/getRow.m +++ b/+types/+util/+dynamictable/getRow.m @@ -46,11 +46,12 @@ row{i} = select(DynamicTable, indexNames, ind); if ~istable(row{i}) - % transpose row vectors - if isrow(row{i}) - row{i} = row{i} .'; - % or permute arrays to place last dimension first - elseif ~ismatrix(row{i}) % i.e nd array where n >= 3 + if iscolumn(row{i}) + % keep column vectors as is + elseif isrow(row{i}) + row{i} = row{i} .'; % transpose row vectors + elseif ndims(row{i}) >= 2 % i.e nd array where ndims >= 2 + % permute arrays to place last dimension first array_size = size(row{i}); num_rows = numel(ind);