plotting epoch time with nanoseconds

8 Ansichten (letzte 30 Tage)
parhat remtulla
parhat remtulla am 19 Jul. 2017
Kommentiert: Rik am 20 Jul. 2017
Hello:
I got two sets of data, both are epoch time with nano seconds, shown as below:
when I try to plot them, I got two exact same lines, as shown below:
How can I plot the difference in these two lines, i.e. bring up the precision including nano seconds, please?
Thank you in advance for any help.
Regards.

Akzeptierte Antwort

Rik
Rik am 19 Jul. 2017
There are several ways you could plot this. Possibly the easiest is to simply plot the difference:
plot(T2-T1)
Other possibilities are to plot against the difference to the mean (like a Bland-Altman plot), or to fit a linear function to this data (with polyfit e.g.) and plot the time difference with that function.
  2 Kommentare
parhat remtulla
parhat remtulla am 19 Jul. 2017
Hi:
Thank you very much for your answer, it is easy to see the difference.
It is supposed to be something like:
Rik
Rik am 20 Jul. 2017
Clearly the differences are not large enough to be seen in the plot you suggest. Why not try that plot(T2-T1) I suggested. You should also keep in mind the comment made by Peter Perkins.
If my answer helped you, please mark it as accepted answer. It will make it easier for other people with a similar question. If Peter Perkins's answer is more helpful, please mark that one.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Peter Perkins
Peter Perkins am 19 Jul. 2017
You say, "with nanoseconds", but in fact what you show is not out to nanosecond precision, only to microsecond. Which is good, because double precision doesn't have enough bits to represent nanoseconds since 1970, and only just barely enough to represend microseconds since 1970.
>> t = 1500469584.003352 % 19-Jul-2017 13:06:24.003352, approximately
t =
1.500469584003352e+09
>> eps(t)
ans =
2.384185791015625e-07
So if you do have timestamps that go out to nanoseconds, and your differences are on the order of nanoseconds, you'll be plotting noise, not data.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by