pagemtimes
Description
computes the matrix product of corresponding pages of the N-D arrays Z
= pagemtimes(X
,Y
)X
and Y
. Each page of the output array Z
is given by the
product: Z(:,:,i) = X(:,:,i)*Y(:,:,i)
.
If one of
X
orY
is a matrix, thenpagemtimes
multiplies it with each page of the other input. For example, ifX
is a matrix, thenZ(:,:,i) = X*Y(:,:,i)
.If
X
andY
have more than three dimensions, then all dimensions beyond the first two must have Compatible Sizes.pagemtimes
implicitly expands the extra dimensions to multiply all combinations of the paged matrices:Z(:,:,i,j,k) = Xx(:,:,i,j,k)*Yy(:,:,i,j,k)
. (The extra dimensions have been expanded inXx
andYy
.)
Examples
Input Arguments
Output Arguments
More About
Tips
For both real and complex N-D arrays,
pagemtimes(X,'transpose',X,'none')
andpagemtimes(X,'none',X,'transpose')
return an array with pages of symmetric matrices. For complex N-D arrays,pagemtimes(X,'ctranspose',X,'none')
andpagemtimes(X,'none',X,'ctranspose')
return an array with pages of Hermitian matrices.Results obtained using
pagemtimes
are numerically equivalent to multiplying each of the same matrices in afor
-loop. However, the two results might differ slightly due to floating-point round-off error.
Extended Capabilities
Version History
Introduced in R2020b