readtable function in 2020a not functioning the same as older versions?

The old version of readtable (2018b) that i am using is able to import text as part of the table and the 2020a version my coworker is using seems to only import numerical data and ignore any information you provide about the number of headerlines. We need to import the text and numerical data from a .csv file and readtable was the only way to do this, its going to be a problem if the code will work differently depending on what version of matlab the users have, does anyone have any suggestions or know why the new version is unable to import the text?

3 件のコメント

Amy Wolff
Amy Wolff 2020 年 8 月 15 日
Thanks, i was able to get the new version to function like the old one by using this code from the compatibility notes: T = readtable(filename,'Format','auto'), which is the same as T = readtable(filename) from earlier versions
Ornit
Ornit 2022 年 8 月 19 日
Thanks! Worked for me too.

サインインしてコメントする。

回答 (1 件)

Cris LaPierre
Cris LaPierre 2020 年 8 月 13 日
編集済み: Cris LaPierre 2020 年 8 月 13 日

0 投票

My experience is that readtable is able to read in more types of data automatically in 2020a than in 2018b. Could you share more details about the formatting of the csv file? Even better, can you share the file and your code?

カテゴリ

ヘルプ センター および File ExchangeEnvironment and Settings についてさらに検索

製品

リリース

R2020a

質問済み:

2020 年 8 月 13 日

コメント済み:

2022 年 8 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by