フィルターのクリア

How can I add time labels to the x-axis of my plot?

1 回表示 (過去 30 日間)
poshan reddy
poshan reddy 2014 年 4 月 16 日
コメント済み: poshan reddy 2014 年 4 月 28 日
sample data .if i have data like this how to plot with exact date and time
with seconds give me a program
31/08/97 03:03:32
31/08/97 03:07:39
31/08/97 03:10:46
31/08/97 03:15:46
31/08/97 03:26:59
31/08/97 03:28:00
31/08/97 03:42:56
31/08/97 03:54:23
31/08/97 03:56:57
31/08/97 04:07:00
31/08/97 04:47:51
31/08/97 22:07:59
  1 件のコメント
dpb
dpb 2014 年 4 月 16 日
編集済み: dpb 2014 年 4 月 16 日
See
doc datenum
doc datetick
and examples thereat
ADDENDUM:
OK at machine w/ a minute...try
>> dn=datenum(datevec(t,'dd/mm/yy HH:MM:SS')); >> plot(dn,rand(size(dn))) >> datetick('x','keeplimits','keepticks')
NB: I cleaned up the above data strings that had tab here and there down to a single space; use format as needed for the actual form.

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

回答 (1 件)

Ralf
Ralf 2014 年 4 月 16 日
I hope it is clear now:
DateTime{1,1} = '31/08/97 03:03:32'; %
DateTime{1,2} = '31/08/97 03:07:39'; %
Yvalue = [3 4]; % Example values
ts1 = timeseries(Yvalue,DateTime); % Create a timeseries object whit oure yvalue %and the time scale
ts1.Name = 'Warming up off ... '; % Give it a name
plot(ts1); % Create a plot of it.
grid ('on');
  1 件のコメント
poshan reddy
poshan reddy 2014 年 4 月 28 日
this is not working well sir,

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

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by