how to count non nan values

205 visualizaciones (últimos 30 días)
trailokya
trailokya el 22 de Jun. de 2016
Editada: Stephen23 el 22 de Jun. de 2016
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

Respuesta aceptada

Stephen23
Stephen23 el 22 de Jun. de 2016
Editada: Stephen23 el 22 de Jun. de 2016
nnz(~isnan(vec))
where vec is the vector (it could even be a matrix or ND array).

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by