I am reading the data from csv files but getting error

5 views (last 30 days)
There is no header or anything in the csv files I am working with but I am getting an error below. Is there something I am missing?
close all; clear all; clc;
x = linspace (-334/2,334/2,1001)
col1 = Array(:,1);
%col2 = Array(:, 2);
hold on
Mismatch between file and format character vector.
Trouble reading 'Numeric' field from file (row number 1, field number 1) ==> -0.001498128\n

Accepted Answer

Ive J
Ive J on 2 Dec 2020
csvread is not recommended anymore, use readmatrix instead.
Array = readmatrix('AverageVelocities.csv');

More Answers (0)


Community Treasure Hunt

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

Start Hunting!