Convert Time (UT to LT)...

Dear All,
I have a data in UT and now I convert it to LT, where LT for each data has a different value (+3,-5,+12,..). Ultimately I want to highlight day and night. I want all of the panel start from 0-24 LT or perhaps 0 become a center and night and day right and left.
Would you please advice me in this regards?
Thanks,
A

6 件のコメント

James Tursa
James Tursa 2017 年 3 月 16 日
Please show a small example of inputs and desired output.
John D'Errico
John D'Errico 2017 年 3 月 16 日
Why not help people? Instead of assuming that everyone knows what UT and LT stands for as abbreviations, tell us. Help those who might help you.
James Tursa
James Tursa 2017 年 3 月 16 日
UT = Universal Time
LT = Local Time
Ara
Ara 2017 年 3 月 16 日
編集済み: Ara 2017 年 3 月 16 日
You are right, I should have provided more information. Thanks James to make it clear. Ok, here is a simple example: UT is a column vector of [0,24]; and I have a data accordingly sorted in another column vector (same size). So, I can plot "data" versus time (UT) easily. But, my problem is when I need to change UT (x axis) to LT;how to change the "data" accordingly and plot it from 0 to 24 (LT). For example, LT = UT+3, which i did add "3" to time. But then the data should sort accordingly. And then I have LT=UT-5. So, my question is how to match time (LT) with data to get a correct plot.
Please let me know if is not clear,
James Tursa
James Tursa 2017 年 3 月 16 日
Again, it would help a lot if you showed a small example with actual numbers. Show us the exact inputs and the desired output.
Ara
Ara 2017 年 3 月 17 日
I am dealing with a large dataset. But, here is an example to make it more clear:
x=data(:,5);
t=data(:,3)./3600;
plot (t, x); % this is in UT
plot (t+3, x); % This one time is in LT but data also need to be in LT

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

回答 (1 件)

Peter Perkins
Peter Perkins 2017 年 3 月 16 日

0 投票

It sounds like you have "hour numbers". Use datetimes. Support for time zones is built in, and simple line plots will just work (plotting support increased in R2016b, not sure what you are using).

3 件のコメント

Ara
Ara 2017 年 3 月 17 日
Thanks, Peter, for your reply. I read "datetimes" but I do not think it match with the one that I want. Can you please give me a small example?
Peter Perkins
Peter Perkins 2017 年 3 月 20 日
I'd have to see a concrete example of what you currently have, and what the problem is.
James Tursa
James Tursa 2017 年 3 月 20 日
I've been asking for this since the 16th ...

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

カテゴリ

ヘルプ センター および File ExchangeShifting and Sorting Matrices についてさらに検索

タグ

質問済み:

2017 年 3 月 16 日

コメント済み:

2017 年 3 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by