- 'EmptyValue' — Returned value for empty numeric fieldsNaN (default) | scalar
- 'TreatAsEmpty' — Strings to treat as empty valuestring | cell array of strings
How to import data with '?'s to feed into knnimpute
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi community! So I have a csv file where I want to import the csv numbers on each line into a row of a matrix. For instance:
1, 3, 4 1, 2, 5
would import into matrix [1 3 4; 1 2 5]. There are various ways to do this is matlab (csvread, for instance), but they don't handle '?'s.
How can I convert this type of data into a form that knnimpute can handle as an input? The examples all have matrixes with NaN values, but I am having trouble turning my data into a matrix with NaN values where my '?'s are.
Thanks for any advice or comments, all appreciated
댓글 수: 1
per isakson
2014년 11월 25일
See textscan:
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 String Parsing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!