Hi, I am using MATLAB R2016a. I have got into a situation where I have to parse through a csv file and draw a plot using them. I am using the following code for that. close all; file = 'test.csv';
Array = csvread(file); col1 = Array(:, 1); col2 = Array(:, 2); plot(col1, col2)
There are total 6 columns in the csv file. I am getting the following errors.
Error using dlmread (line 147) Mismatch between file and format string. Trouble reading 'Numeric' field from file (row number 1, field number 1) ==> /in X,/in Y,/z X,/z Y,/out X,/out Y\n
Error in csvread (line 48) m=dlmread(filename, ',', r, c);
Error in untitled (line 4) Array = csvread(file);
Can anyone suggest me a solution? Thanks in advance.
Regards
Saikat Chatterjee
Best Answer