Plotting data from a .csv file
조회 수: 451 (최근 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에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!