-1
我绘制了一些变量和时间之间的关系。 时间位于矩阵中;部分如下:在Matlab中绘制时间的错误
> 19.997777777777774
19.998055555555560
19.998333333333338
19.998611111111117
19.998888888888892
这是UTC时间(时间间隔:1小时,间隔:1秒)转换后带小数点的小时数。
它可以通过一些常见的原因造成的我没有注意到? 谢谢。
更新:
h=nmea/10000;
h_int = floor(h);
h_dec = h - h_int;
m = h_dec * 100;
m_int = floor(m);
m_dec = m - m_int;
s = m_dec * 100;
time= h_int + m_int/60 + s/3600;
参考NMEA:195955 195956 195957 195958 195959]
您可以发布您用于绘图的代码吗? – Aziz
plot(time,data1,time,data2) – reznik
以及用于将时间转换为十进制小时的代码? – Aziz