How do I vectorize matrices of specific modes of a tensor?

조회 수: 1 (최근 30일)
Krishna Shivani
Krishna Shivani 2020년 7월 22일
답변: James Tursa 2020년 7월 22일
If I have a 3-way 250 x 250 x 183 tensor, how would I go about vectorizing the matrices of modes 1-2 so that I return a matrix of size 250^2 x 183? Thank you!

답변 (1개)

James Tursa
James Tursa 2020년 7월 22일
Is this what you want?
x = your 250 x 250 x 183 array
result = reshape(x,250*250,183);

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by