フィルターのクリア

How to set x-axis into HH:MM format?

1 回表示 (過去 30 日間)
Lu Da Silva
Lu Da Silva 2021 年 9 月 7 日
コメント済み: the cyclist 2021 年 9 月 7 日
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 件のコメント
Lu Da Silva
Lu Da Silva 2021 年 9 月 7 日
It's just two vecors tho, like:
A = [ 24 25 26 27 24 24 24]
B = [ 02:20 02:30 02:40 02:50 03:00 03:10 03:20]
and I'd like to plot A against B
the cyclist
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]
B = 1×162
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 3 4 5 6 7 8 9 10 11 12
that are clearly not defining times.

サインインしてコメントする。

回答 (1 件)

Dave B
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

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by