MATLAB Answers

Data import from csv file

6 views (last 30 days)
I want to import data from my csv file which has more than 2 million rows. I cant open the file in csv format. Thus, I want to open this in matlab and do the operations. I have used x= importdata('filename.csv') but this does not work.

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 16 Jul 2019
These days we recommend readtable() -- or if you have R2019a or later and your data is entirely numeric, then possibly readmatrix()
If your data is all numeric then you might be able to get a little higher performance with csvread(), which invokes dlmread(), which invokes textscan() to do the work.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags