How do I check if any elements are not a number in a matrix.

29 次查看(过去 30 天)
I want to check that the matrix I have contains any non numbers in it. I guess I would use the any() function? I just don't know what code to use.

采纳的回答

Friedrich
Friedrich 2014-3-24
Hi,
I think you are looking for isfinite. (isNaN covers NaN values only but isfinte covers NaN as well as Inf).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by