Read a table with numbers and strings

조회 수: 68 (최근 30일)
Dori Lavie
Dori Lavie 2021년 5월 12일
답변: Star Strider 2021년 5월 12일
I want to read a table which contains both numbers and strings. I tried using readtable but some of the columns include both of them, so instead of strings i'm getting NaN.
Any ideas how to solve it? It's okay for me if such a mix column will be read as a column of strings.
Thank you!

채택된 답변

Star Strider
Star Strider 2021년 5월 12일
I would use the readcell function (introduced in R2019a), then create a table from the processed data to determine how best to represent the file contents.
If you do not have readcell, experiment with fileread and go from there.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by