deleting n entries in matlab

2 Ansichten (letzte 30 Tage)
ali hassan
ali hassan am 12 Feb. 2022
Bearbeitet: Matt J am 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]

Akzeptierte Antwort

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

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by