Import data from CSV file by Import Tool or textscan

3 次查看(过去 30 天)
I can import data from csv file by Import Tool(out type:string), and the tool could creat a script(textscan in it) to instead Import Tool. But, when I use Import Tool or script to import csv file, it lost blank line which in csv file. How to solve it? Thanks.
  4 个评论
kei hin
kei hin 2021-11-5
编辑:kei hin 2021-11-5
readtable lost blank line too,and variable name in csv file will be changed. It is boring.

请先登录,再进行评论。

采纳的回答

kei hin
kei hin 2021-11-5
In the script which Import Tool created, change
delimiter = ',';
to
delimiter = {',','\r'};
It seems to have been solved.

更多回答(1 个)

Sulaymon Eshkabilov
Use readmatrix() that would import all numerical data in a matrix form.

类别

Help CenterFile Exchange 中查找有关 Data Import and Export 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by