Reading data from csv with non uniform formatting
6 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to read data from a cvs file (sample attached) with uneven formatting where there are a few sentences and lines with missing data points. I have been reading the file and then getting the row number for each time the column with is different to extract the data. I am trying to read ( and remove) the sentences and also remove the partially complete rows and creating one array from the remaining data. Is there any better way of doing this withouth having to check which row is incomplete? Any suggestions would be very helpful.
Thank you
採用された回答
Cris LaPierre
2023 年 4 月 24 日
I would use readtable with the settings to 'omitrow' when data is missing.
T = readtable('sample.csv','MissingRule','omitrow')
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!