Here is one set of time data in seconds that is imported 3401.82409375 3443.09343269231 3450.68662723214 3456.25735677083 3458.4955078125 3468.43663570804 3479.25066346154 3481.85364375 4591.54526201923
and after importing this data, the output is:
1.0e+003 *
3.4018
3.4431
3.4507
3.4585
3.4684
3.4793
3.4819
my concern is with another set of data that I am trying to syncronize with the other set of data: 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0
Using the following script:
[Y, M, D, H, MN, S] = datevec(data{2}); out = H*3600+MN*60+S; subplot(2,1,2), plot(out, data_to_plot)
gives me the following output:
3.8629
3.8630
3.8630
3.8630
3.8630
3.8630
3.8630
3.8630
3.8630
3.8630
Should I expected a similar magnitude of e+003? If not, how can I shift the second set of data to match the one on the left? I tried adding 3000 but it remained constant.

4 件のコメント

José-Luis
José-Luis 2012 年 10 月 19 日
Maybe it's just me but this question is not very clear.
"my concern is with another set of data that I am trying to syncronize with the other set of data: 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0 42:46.0"
What does that mean? 42:46 is a row vector. How's the variable data look like?
T
T 2012 年 10 月 19 日
編集済み: T 2012 年 10 月 19 日
So there are two columns of data.
The first being 3401.82409375 etc.
the second being 42:46.0 etc
is that clear?
T
T 2012 年 10 月 19 日
Why would the following:
[Y, M, D, H, MN, S] = datevec(data{2}); out = H*3600+MN*60+S;
Give me values of the order 0e+003 * 3.4018 3.4431 and so on as opposed to
3401.8 and 3443.1 and so on?
Walter Roberson
Walter Roberson 2012 年 10 月 19 日
Give the command
format long
and display the output again.

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2012 年 10 月 19 日

0 投票

datevec(data{2}, 'MM:SS.FFF')
would be my guess. The output would be in the same magnitude as the 3.4801E3... but about 1000 smaller. Your 3400-ish values are on the order of 50 minutes rather than 42.

2 件のコメント

T
T 2012 年 10 月 19 日
I generate a weird signal when I plot the data using that command. I also obtain an arbitrary vertical line 2000 s after the main signal.
T
T 2012 年 10 月 22 日
Sorry, what did you mean of the order of 50 minutes rather than 42? Of what significance is this? I just leave the data as it is.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Data Import and Analysis についてさらに検索

タグ

質問済み:

T
T
2012 年 10 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by