필터 지우기
필터 지우기

How to plot date and time data on the same axis?

조회 수: 2 (최근 30일)
Noah Poole
Noah Poole 2018년 8월 23일
답변: Walter Roberson 2018년 8월 23일
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
Noah Poole
Noah Poole 2018년 8월 23일
R2018a is the MATLAB version that I'm using.
Haritha
Haritha 2018년 8월 23일
Try this, https://in.mathworks.com/help/matlab/creating_plots/combine-multiple-plots.html

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 8월 23일
filename = 'brisbanecbd-aq-2010.csv';
data = readtable(filename);
x = data{:,3};
pm10 = data{:,8};
plot(x, pm10);

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by