How to plot date and time data on the same axis?
9 ビュー (過去 30 日間)
古いコメントを表示
I have an excel file that has a column for date, time and pollution levels. I want to plot the date AND time on the x-axis and the pollution levels on the y-axis, but I do not know how to combine the two columns in matlab or how to then properly put these on the x-axis. Any help would be much appreciated. Please see attached excel file that I am using. Thanks,
3 件のコメント
Haritha
2018 年 8 月 23 日
Try this, https://in.mathworks.com/help/matlab/creating_plots/combine-multiple-plots.html
回答 (1 件)
Walter Roberson
2018 年 8 月 23 日
filename = 'brisbanecbd-aq-2010.csv';
data = readtable(filename);
x = data{:,3};
pm10 = data{:,8};
plot(x, pm10);
0 件のコメント
参考
カテゴリ
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!