remove the empty zero value layers in multidimensional matrix

12 次查看(过去 30 天)
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