Select data from a date range
古いコメントを表示
I would like to select data from a date range using month end. I have a bunch of month end dates in datetime and numeric values for each of those. I want to be able to extract the values by inputting a date range. For example, return all numeric values for 1/31/2012 to 12/31/15. Then I would take the standard deviation of that 3 year history.
1 件のコメント
Azzi Abdelmalek
2015 年 6 月 15 日
Can you post a sample of your data?
回答 (1 件)
Azzi Abdelmalek
2015 年 6 月 15 日
d=datenum('1/31/2010'):datenum('12/31/15') % Example
data=randi(9,numel(d),1)'
d1=datenum('1/31/2012')
d2=datenum('12/31/2015')
idx=d>d1& d<d2
out=[d(idx); data(idx)]'
1 件のコメント
Harry Lindner
2015 年 6 月 15 日
編集済み: Harry Lindner
2015 年 6 月 15 日
カテゴリ
ヘルプ センター および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!