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

1 visualización (últimos 30 días)
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

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by