Page-wise transpose
Y = pagetranspose(X)
example
Y = pagetranspose(X) applies the nonconjugate transpose to each page of N-D array X. Each page of the output Y(:,:,i) is found by transposing the corresponding page in X, as in X(:,:,i).'.
X
Y(:,:,i)
X(:,:,i).'
collapse all
Create a 3-D array A, and then use pagetranspose to transpose each page of the array.
A
pagetranspose
r = repelem(1:3,3,1); A = cat(3,r,2*r,3*r)
A = A(:,:,1) = 1 2 3 1 2 3 1 2 3 A(:,:,2) = 2 4 6 2 4 6 2 4 6 A(:,:,3) = 3 6 9 3 6 9 3 6 9
B = pagetranspose(A)
B = B(:,:,1) = 1 1 1 2 2 2 3 3 3 B(:,:,2) = 2 2 2 4 4 4 6 6 6 B(:,:,3) = 3 3 3 6 6 6 9 9 9
Input array, specified as a multidimensional array.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | cell | categorical | datetime | duration | calendarDuration Complex Number Support: Yes
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
logical
char
string
struct
cell
categorical
datetime
duration
calendarDuration
The page-wise transpose is equivalent to permuting the first two dimensions of the array with permute(X,[2 1 3:ndims(X)]).
permute(X,[2 1 3:ndims(X)])
pagectranspose | permute | transpose
pagectranspose
permute
transpose
You have a modified version of this example. Do you want to open this example with your edits?