How can I calculate delta T?

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.

Answers (1)

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 ...

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Asked:

on 25 Feb 2016

Answered:

on 25 Feb 2016

Community Treasure Hunt

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

Start Hunting!