Hello, how can i remove zero from an array and leave the array in the same form? thanks
Show older comments
for example,
for Aij !=0
bil = Aij
i,j,l,++
A =
1 0 2 6 0
0 3 4 0 0
5 0 2 7 4
to become
b=
1 2 6 NaN
3 4 NaN NaN
5 2 7 4
Accepted Answer
More Answers (0)
Categories
Find more on Shifting and Sorting 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!