I have (double type) matrix where I have NaN values. I want to change all NaN values to 0 value. How Can I do that?

14 次查看(过去 30 天)
I have (double type) matrix where I have NaN values. I want to change all NaN values to 0 value. How Can I do that?

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-2-20

更多回答(1 个)

Thorsten
Thorsten 2013-2-20
X(isnan(X)) = 0;

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by