Remove Zeros Matrix on 3D Matrix
Show older comments
I have Matrix A twhich is a 3D matrix that contain zeros matrix, How to delete the zeros matrix?
here i attach the example of my matrix.

the result that i want is matrix A should be (2,3,3)
Accepted Answer
More Answers (1)
function main
val = rand(2,3,4)
val(:,:,3) = []
end
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!