필터 지우기
필터 지우기

Truncating a 3-d matrix into 2-d

조회 수: 1 (최근 30일)
Kash022
Kash022 2017년 2월 17일
편집: the cyclist 2017년 2월 17일
Hi All,
I have a matrix
X=16x16x4000
I want to truncate it (and delete the 4000 entirely) and make it to just 16x16. How should I do this? I have tried everything from permute to using [ ] but it just doesn't work. Thanks!
  댓글 수: 1
Easwar Kumar Yarrabikki
Easwar Kumar Yarrabikki 2017년 2월 17일
Have you tried to reshape it to 16x16...?

댓글을 달려면 로그인하십시오.

채택된 답변

the cyclist
the cyclist 2017년 2월 17일
편집: the cyclist 2017년 2월 17일
You are not being specific enough to determine a unique solution. If you are happy with just the first "slice" in the 3rd dimension, then
X(:,:,1)
is a 16x16 array.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by