count nan of different rows
조회 수: 3 (최근 30일)
이전 댓글 표시
I have this that adds 485 rows and more than a thousand columns but many of the values are NaN, I would like to count how many of those values are numbers but in each row. that is, each row represents data from a sensor and I want to know which sensor provides more numerical data
clear all;close all
load 'TG_sshobscorr.mat'
data=sshobscorr
댓글 수: 0
채택된 답변
Stephen23
2023년 3월 21일
S = load('TG_sshobscorr.mat');
D = S.sshobscorr;
Try either of these:
N = sum(~isnan(D),2)
N = sum(isfinite(D),2)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 NaNs에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!