How can I calculate delta T?
8 ビュー (過去 30 日間)
古いコメントを表示
Hello, I've been given some vectors and I'm supposed to calculate delta T for them. It says that to calculate it I need the three time vectors, hour minute and second, but I'm really confused about what I'm supposed to be doing with them. At index 1 it should equal zero, at 2 it should be 20, and at 3 it should be 40.
These are my time vectors:
hour = [9,9,9,9,9,9,9]
minute = [14,14,14,15,15,15,16]
second = [0,20,40,0,20,40,0]
I also have vectors for latitude and longitude, which I've already used to calculate distance and position, but I don't know if those are related to finding delta T. If they are I will post those as well. Thank you for the help.
0 件のコメント
回答 (1 件)
Jos (10584)
2016 年 2 月 25 日
Simply convert the time points to seconds
TotalSeconds = second + 60 * minute + 3600 * hour
Then you should take a look at the matlab function diff
help diff
I leave it to you to add the required zero to the beginning ...
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!