unshiftdata

Revert the order of matrix dimensions modified by shiftdata.

Syntax

out = unshiftdata(x, perm, shifts)

Inputs

x
The matrix on which to revert a dimension shift.
Type: double | complex
Dimension: vector | matrix
perm
A permutation vector from shiftdata.
(default: the first non-singleton dimension.)
Type: integer
Dimension: vector
shifts
The number of shifts from shiftdata.
Type: integer
Dimension: scalar

Outputs

out
The reverted matrix.

Example

x = reshape([1:24],4,2,3);
[xs, perm, shifts] = shiftdata(x, 2)
y = unshiftdata(xs, perm, shifts);

Comments

unshiftdata is typically used following shiftdata to restore the orignal order of dimensions.