How do I Make A Plot Using System Time Values?

1 回表示 (過去 30 日間)
Jay H
Jay H 2015 年 8 月 22 日
回答済み: Walter Roberson 2015 年 8 月 22 日
Hi there,
I'm having trouble figuring out something that I'm sure is really simple. I'm logging the output of a sensor, but the software generates timestamps using the system clock. I have tried using the import feature, to no success. I have attached the included log file in Excel format which I'm sure will clarify things a little bit.
Thanks.

回答 (2 件)

Gareth Thomas
Gareth Thomas 2015 年 8 月 22 日
Maybe this will help you:
mydata = readtable('sensor_log.xls');
mydata.Time=datetime(mydata.Time,'ConvertFrom','datenum','Format','HH:mm:ss')
Please note that I am using R2015a.
If you are using earlier versions you might want to use datestr.

Walter Roberson
Walter Roberson 2015 年 8 月 22 日

カテゴリ

Help Center および File ExchangeClocks and Timers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by