how to count non nan values

50 次查看(过去 30 天)
Sir in a vector of large dimension say (750,1) which has NaNs as well as some values. I want to count the non nan values. would you please help me

采纳的回答

Stephen23
Stephen23 2016-6-22
编辑:Stephen23 2016-6-22
nnz(~isnan(vec))
where vec is the vector (it could even be a matrix or ND array).

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by