extract numbers from time series
古いコメントを表示
Have a time series from 1 to 156. Want to extract the values from 1:6, then from (1+12) : (6+12), etc into a new variable. How to go about.
6 件のコメント
Adam Danz
2018 年 8 月 13 日
That's not enough in your example for anyone to extrapolate the pattern you seek. For example, would the subunits be 1:6, 13:18, 14:19, 15:20? Or 1:6, 13:18, 19:24,... ?
Johannes Deelstra
2018 年 8 月 13 日
Adam Danz
2018 年 8 月 13 日
What format are your dates in?
class(data(:,5))
Johannes Deelstra
2018 年 8 月 13 日
Adam Danz
2018 年 8 月 13 日
Ok. If the numbers are serial date numbers that matlab recognizes, my solution should work well. Otherwise, we'd just need to convert them to a format that Matlab recognizes which should be fairly simple.
Johannes Deelstra
2018 年 8 月 13 日
採用された回答
その他の回答 (1 件)
Fangjun Jiang
2018 年 8 月 13 日
a=1:156;
b=reshape(a,6,[]);
c=b(:,1:2:end)
カテゴリ
ヘルプ センター および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!