简体   繁体   中英

Matlab csvread() creating wrong matrix

I simply want to import a matrix from a .csv into Matlab and find that Matlab is acting differently wrt length of a row in my csv. :

First, I read a file of 2 rows with 50000 columns and Matlab correctly shows a 2*50000 matrix in my workspace. Now, if the file consists of 2 rows with 100000 columns, Matlab identifies it as a 200000*1 matrix.

What has gone wrong there?

What command are you using? csvread('filename.csv') ?

I would personally prefer to use

Data = importdata( 'filename.csv','\\t');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM