How to set x-axis into HH:MM format?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a double of 21x1 which corresponds to the air temperature over time. The time is a cell (21x1) containing the hour at which the temperature was measured, in the format HH:MM. The measurements were taken every 10 minutes from 03:20 to 06:40. How do I plot (scatterplot) temperature vs time?
댓글 수: 3
the cyclist
2021년 9월 7일
The advantage of actually uploading the data is that you do not inadvertently make MATLAB statements such as
B = [ 02:20 02:30 02:40 02:50 03:00 03:10 03:20]
that are clearly not defining times.
답변 (1개)
Dave B
2021년 9월 7일
The B that you list in your snippet doesn't look like times. Here's an example where B is actually a time:
A = [24 25 26 27 24 24 24];
B = datetime('now') + minutes(10:10:70);
scatter(B,A,'filled')
axis padded
댓글 수: 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!