Plotting data from a .csv file
1,013 次查看(过去 30 天)
显示 更早的评论
Hi I need to plot a graph in MATLAB using data from a .csv file which has 2 columns of data, column A and column B. Can you please tell me the codes to use to do that? Thanks.
Winee
采纳的回答
sixwwwwww
2013-12-4
you can do it as follows:
Array=csvread('filename.csv');
col1 = Array(:, 1);
col2 = Array(:, 2);
plot(col1, col2)
3 个评论
Carolina Pulido
2020-6-10
I was able using this commands. Thanks. Reddy, check don't use titles into the columns.
Anthony Sirico
2020-6-15
Can i plot data froma CSV file with a column of Names?, i.e col1 = star names, col2 = distances.
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!