필터 지우기
필터 지우기

Reshape array 3 variables into 2?

조회 수: 2 (최근 30일)
Auryn_
Auryn_ 2018년 1월 30일
편집: Andrei Bobrov 2018년 1월 30일
Hi,
I have an array of A=1x100x50.
How can I reshape it in B=100x50?
I have tried with
B=reshape(A,[100, 50]);
But I get the error message
Error using reshape To RESHAPE the number of elements must not change.
Thanks in advance for your reply.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2018년 1월 30일
편집: Andrei Bobrov 2018년 1월 30일
B = squeeze(A)
or
B = permute(A,[2,3,1]);
or
B = reshape(A,size(A,2),[]);

추가 답변 (1개)

Abhishek Ballaney
Abhishek Ballaney 2018년 1월 30일
https://in.mathworks.com/help/matlab/ref/reshape.html

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by