"Merge" quarterly and daily data
3 次查看(过去 30 天)
显示 更早的评论
dear All,
suppose I have two types of data:
Date_mv MV
01/2000 12
01/2000 11
01/2000 13
... one line for every day in the first quarter of 2000 that I have data.
01/2000 15
02/2000 16
...one line for every day in the first second of 2000 that I have data.
02/2000 13
...
and
Date_lev LEV
1/2000 5
2/2000 6
3/2000 4
4/2000 5
1/2001 6
I now want to "match" and do simple computations where I need the corresponding quarterly LEV value for each daily MV value.
Both date vectors are stored in struct. so are the MV and LEV values, for which I have N each (for N companies).
Say I want:
X(t) = MV(t)*LEV(t)-LEV(t-1)*MV(t-1)
While I conceptually understand what I want, I am not sure how to approach this in matlab. Can anyone help?
Thanks in advance!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!