I am reading the data from csv files but getting error

2 ビュー (過去 30 日間)
muhammad choudhry
muhammad choudhry 2020 年 12 月 2 日
回答済み: Ive J 2020 年 12 月 2 日
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?
Code:
close all; clear all; clc;
Array=csvread('AverageVelocities.csv');
x = linspace (-334/2,334/2,1001)
col1 = Array(:,1);
%col2 = Array(:, 2);
plot(x,col1)
hold on
Error:
Mismatch between file and format character vector.
Trouble reading 'Numeric' field from file (row number 1, field number 1) ==> -0.001498128\n
  2 件のコメント
Mathieu NOE
Mathieu NOE 2020 年 12 月 2 日
hi
can you share the csv file ?
muhammad choudhry
muhammad choudhry 2020 年 12 月 2 日
attached is the csv

サインインしてコメントする。

採用された回答

Ive J
Ive J 2020 年 12 月 2 日
csvread is not recommended anymore, use readmatrix instead.
Array = readmatrix('AverageVelocities.csv');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by