read csv data with numbers, characters and text
古いコメントを表示
Greetings
Does anyone have any idea on how to import numerical data from a csv file of the following format:
STATION DATE LATITUDE LONGITUDE ELEVATION NAME PRCP PRCP_ATTRIBUTES TMAX TMAX_ATTRIBUTES TMIN TMIN_ATTRIBUTES
BC000068026 01/02/32 -18.367 21.85 1000 SHAKAWE, BC 0 ,,Q
I'm attaching a sample file
Matlab2016b
Thank you very much in advance
6 件のコメント
Walter Roberson
2023 年 5 月 22 日
Try readtable
Simon Lind
2023 年 5 月 22 日
Cris LaPierre
2023 年 5 月 22 日
編集済み: Cris LaPierre
2023 年 5 月 22 日
I suggest posting at least a portion of your file so that we can try out different approaches. Use the paperclip icon.
Walter Roberson
2023 年 5 月 22 日
readtable was added in R2013b. In the R2016b time-frame you would very likely want to use detectImportOptions() first.
Simon Lind
2023 年 5 月 22 日
Image Analyst
2023 年 5 月 22 日
If the format is too custom and varies from file to file, you may have to write your own custom reader where you read a line at a time and parse it appropriately.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Variables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

