deleting n entries in matlab

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

采纳的回答

Matt J
Matt J 2022-2-12
编辑:Matt J 2022-2-12
a=[1 nan 4 nan 4 3 ];
a=a(~isnan(a))
a = 1×4
1 4 4 3

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 NaNs 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by