Plot a timeseries and count the days on x-axis.
2 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone.
I would like to plot a timeseries with the following code:
load('v_wt_s.mat')
v_wt_s=v_wt_s-273.15;
v_wt_s.TimeInfo.Units = 'hours';
v_wt_s.TimeInfo.Format = 'HH';
plot(v_wt_s)
title('Vorlauf WT-S TTR20-004')
xlabel('Hours')
ylabel('Temperature [°C]')
load('v_wt_s.mat')
I would like to display the hours on the x-axis but what i get is the following:

The scale on the x-axis is still showing the seconds and not the hours.
Does anyone know how to solve this?
Thank you very much for your answers.
4 件のコメント
採用された回答
Cris LaPierre
2021 年 12 月 11 日
load('v_wt_s.mat')
% Convert timeseries to timetable
v_wt_s=timeseries2timetable(v_wt_s);
% Convert time to hours
v_wt_s.Time.Format = "h";
v_wt_s.Data=v_wt_s.Data-273.15;
plot(v_wt_s.Time,v_wt_s.Data)
title('Vorlauf WT-S TTR20-004')
xlabel('Hours')
ylabel('Temperature [°C]')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Time Series Events についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
