matrix23
matrix23

Reputation: 23

read in semi colon separated CSV files

I have a CSV file which I want to read in using matlab.

I've tried using csvread but it does not seem to recognize the semi-colon as the delimiter. Is there any other way?

R;W    
100;0.1    
200;0.5    
300;0.9

Upvotes: 1

Views: 782

Answers (1)

Suever
Suever

Reputation: 65430

You can use dlmread instead and specify the delimeter to be a semi-colon. You will also want to set the row offset to 1 so you skip the first non-numeric row.

data = dlmread('filename.csv', ';', 1);

Upvotes: 1

Related Questions