how to count non nan values

조회 수: 42 (최근 30일)
trailokya
trailokya 2016년 6월 22일
편집: Stephen23 2016년 6월 22일
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