I would like to remove zeros from my matrix

2 visualizaciones (últimos 30 días)
Ashkan Rigi
Ashkan Rigi el 26 de Oct. de 2021
Respondida: Walter Roberson el 27 de Oct. de 2021
a=[0 0 0; 0 0 0; 1 2 3; 4 5 6]
  3 comentarios
Rik
Rik el 27 de Oct. de 2021
@Aladdin, this is an answer to what might be a homework question. Please consider either moving your comment to the answer section (by deleting this and reposting it) or deleting your comment.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 27 de Oct. de 2021
a = [0 0 0; 0 0 0; 1 2 3; 4 5 6]
a = 4×3
0 0 0 0 0 0 1 2 3 4 5 6
b = rmmissing(standardizeMissing(a, 0))
b = 2×3
1 2 3 4 5 6

Categorías

Más información sobre Data Distribution Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by