HOw do i find indices of 'NAN' rows in excel raw file in matlab?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have raw excel file imported in matlab.It is a 5x5 raw file.There are cells where there are 'NAN'in it .I have to find the indices of the 'NAN' rows in the raw file. Can anyone help me to solve this?
I have attached my raw file
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191030/image.png)
댓글 수: 2
Jan
2018년 6월 5일
What is a "raw excel file"? Where are these "NaN" 's displayed? Are they strings? Is this the array browser of Matlab?
답변 (1개)
KSSV
2018년 6월 6일
YOu can get the NaN's position using: isnan
Rea dabout isnan for logical indexing. Also have a look on find.
A = [1 2 NaN 4 NaN] ;
idx = isnan(A) %logical indexing
pos = find(idx) % indices
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!