Relevant change from sub2ind: R2024a: sub2ind accepts mix of scalars and vectors for subscript inputs sub2ind now leverages scalar expansion and accepts a mix of scalars and vectors for subscript ...
%TT_SUB2IND Converts multidimensional subscripts to linear indices. % INDS = TT_SUB2IND(SIZ,SUBS) returns the linear indices % equivalent to the subscripts in the array SUBS for a tensor of % size SIZ ...