Borrar filtros
Borrar filtros

deleting n entries in matlab

1 visualización (últimos 30 días)
ali hassan
ali hassan el 12 de Feb. de 2022
Editada: Matt J el 12 de Feb. de 2022
if a=[1 nan 4 nan 4 3 ]
how can i delete all nan entries here such that it becomes:
a=[1 4 4 3]

Respuesta aceptada

Matt J
Matt J el 12 de Feb. de 2022
Editada: Matt J el 12 de Feb. de 2022
a=[1 nan 4 nan 4 3 ];
a=a(~isnan(a))
a = 1×4
1 4 4 3

Más respuestas (0)

Categorías

Más información sobre NaNs 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