Azzera filtri
Azzera filtri

deleting n entries in matlab

1 visualizzazione (ultimi 30 giorni)
ali hassan
ali hassan il 12 Feb 2022
Modificato: Matt J il 12 Feb 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]

Risposta accettata

Matt J
Matt J il 12 Feb 2022
Modificato: Matt J il 12 Feb 2022
a=[1 nan 4 nan 4 3 ];
a=a(~isnan(a))
a = 1×4
1 4 4 3

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by