Why matlab reading data from csv file completely different ?

1 次查看(过去 30 天)
Hi,
I am reading first and 7 column from the csv file attached using the code below but whenever on workspace I check the csv file data it is completely different then
what I have in the csv file. Why is this happening?
Code:
%Read the CSV file and Extract data
data=csvread('Mesh.csv',1,0); % read the csv file, skip header row
plot(data(:,1),data(:,7)) % plot 2nd column vs 1st
xlabel('Cases')
ylabel('totalcell')

采纳的回答

VBBV
VBBV 2020-12-1
The data in 2nd column of your csv file is treated as text since it was not pasted to excel file correctly,
See the attached file which is corrected now. Use readtable instead of csvread

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by