Given an array x, this function produces a cell array of slices from the array determined by the index vectors lb, ub, for lower and upper bounds, respectively.
In other words, it is equivalent to the following code:
n = length (lb); sl = cell (1, n); for i = 1:length (lb) sl{i} = x(:,…,lb(i):ub(i),…,:); endfor
The position of the index is determined by dim. If not specified, slicing is done along the first non-singleton dimension.
See also: cell2mat, cellindexmat, cellfun.
Package: octave