How to set all elements of a matrix that meet a certain criteria to NaN?

4 次查看(过去 30 天)
I have a Matrix A with the size of [200 100 20 60]. How do I set all elements larger than 10^20 as NaN?

采纳的回答

Star Strider
Star Strider 2018-3-14
Try this:
A(A > 1E+20) = NaN;

更多回答(0 个)

类别

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

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by