remove nan from table with string and numeric type
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have data as cell data type like:
'HRD_0085' [ 190.7900]
'HRD_0086' [ 11.6500]
'WAT_0087' [ NaN]
etc.
I was trying to apply formula like below in order to get rid of all rows with nan but it doesnt work:
out = C(any(cellfun(@(x)any(~isnan(x)),C),2),:);
Any clue?
Thanks a lot
댓글 수: 0
채택된 답변
Stephen23
2017년 6월 12일
C = {
'HRD_0085' [ 190.7900]
'HRD_0086' [ 11.6500]
'WAT_0087' [ NaN]
};
C(~cellfun(@isnan,C(:,2)),:)
추가 답변 (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!