Line chart in matlab reading data points from file.csv
1 次查看(过去 30 天)
显示 更早的评论
Suppose data stored in .csv file .
eg:
Time D1 D2 D3 D4 D5 are in 6 column of csv file. Draw a line chart Time Vs data points (Time in x axis and Data point on y axis )
0 个评论
回答(1 个)
Asad (Mehrzad) Khoddam
2020-9-4
% change data.csv to your data file. should be in path
data = csvread('data.csv',1,0) % the first row hold the header
t = data(:,1);
D1 = data(:,2);
D2 = data(:,3);
D3 = data(:,4);
D4 = data(:,5);
D5 = data(:,6);
plot(t,D1,t,D2,t,D3,t,D4,t,D5);
另请参阅
类别
在 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!