remove the empty zero value layers in multidimensional matrix

조회 수: 13 (최근 30일)
sveta sveta
sveta sveta 2019년 2월 13일
편집: James Tursa 2019년 2월 14일
Let's say. I have nD array of any size and dimensions.
How can I get delete zeros layers?
Thanks
  댓글 수: 3
sveta sveta
sveta sveta 2019년 2월 13일
Yes, I'm trying to delete 2D layers that consist of entirely 0's.
For example, I have (n1,n2,n3) array. After deleting I get (n1-k1,n2-k2,n3-k3) array.
Where k1, k2, k3 are the number of layers to delete.
James Tursa
James Tursa 2019년 2월 14일
편집: James Tursa 2019년 2월 14일
You didn't provide an example. From your description, the 2D layer could be along any dimension?

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by