I have a matrix, there are zeros values in that and i just want to remove the zero values from the array

1 Ansicht (letzte 30 Tage)
0 0 0 0 0 0 0 0 0,131000000000000 0,147000000000000 0,153000000000000 0,153000000000000 0,154000000000000 0,152000000000000 0,153000000000000 0,153000000000000 0,154000000000000 0,153000000000000 0,153000000000000 0,153000000000000 0,151000000000000 0,153000000000000 0,153000000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,126000000000000 0,147000000000000 0,151000000000000 0,153000000000000 0,154000000000000 0,153000000000000 0,154000000000000 0,153000000000000 0,153000000000000 0,154000000000000 0,154000000000000 0,154000000000000 0,156000000000000 0,153000000000000 0,154000000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,124000000000000 0,147000000000000 0,153000000000000 0,153000000000000 0,153000000000000 0,153000000000000 0,153000000000000 0,153000000000000 0,151000000000000 0,153000000000000 0,155000000000000 0,153000000000000 0,154000000000000 0,153000000000000 0,154000000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,120000000000000 0,144000000000000 0,152000000000000 0,151000000000000 0,153000000000000 0,152000000000000 0,154000000000000 0,155000000000000 0,151000000000000 0,154000000000000 0,149000000000000 0,153000000000000 0,153000000000000 0,152000000000000 0,153000000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I have this array and i just want to remove the 0 values from the array

Akzeptierte Antwort

Amith Kamath
Amith Kamath am 10 Jan. 2013
if A is the array in question, you could do:
A = A(A ~= 0);

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by