Borrar filtros
Borrar filtros

How can I calculate delta T?

8 visualizaciones (últimos 30 días)
Aaron Zorzi
Aaron Zorzi el 25 de Feb. de 2016
Respondida: Jos (10584) el 25 de Feb. de 2016
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.

Respuestas (1)

Jos (10584)
Jos (10584) el 25 de Feb. de 2016
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 ...

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by