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

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

采纳的回答

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

更多回答(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