Replace one NAN with zero in a row vector without a loop

1 次查看(过去 30 天)
I have a row vector that its size is changing in each run. Some of its elements might be NAN and I want to replace those with zero.
How can I do that without need to have a loop? isnan(A) finds nan values but I need to replace and I want to avoid loop.

采纳的回答

Raj
Raj 2019-8-19
A(isnan(A)) = 0; % replaces NAN elements of A matrix by Zero.

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by