Plottig数据-时间图 [英] Plottig data - time plotting

查看:66
本文介绍了Plottig数据-时间图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Matlab中绘制一些数据,但是在正确显示时间方面存在问题.

I want to plot some data in Matlab, but I'm having problems with properly displaying time.

时间的格式:

HH:MM:SS.miliseconds 

例如:11:16:41.835

我阅读了我的.txt文件(制表符分隔),现在我需要绘制数据.所有数据的长度均相同,我认为时间格式存在问题.有什么建议吗? plot(time, data1)也不起作用.

I read my .txt file (tab delimited), and now I need to plot data. All data are the same length, and I reckon there is a problem with the time format. Any advice? plot(time, data1) doesn't work either.

推荐答案

考虑使用matlab的内置datavec,例如:

Consider using matlab's built-in datavec, for example:

 dvec = datevec('11:21:02.647', 'HH:MM:SS.FFF') 

dvec =   1.0e+003 *
2.0100    0.0010    0.0010    0.0110    0.0210    0.0026

更多信息,请参见此处

这篇关于Plottig数据-时间图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆