How to create a only a time vector starting 13:15:00 to 20:59:00 with 1 minute interval? R2016a

7 ビュー (過去 30 日間)
I already have a DATE series and i need to create a time series wiith equally spaced 1 minute interval from 13:15:00 to 20:59:00 and attach it with DATE series. How to Create such time series and then attach them with DATE data.

採用された回答

Chad Greene
Chad Greene 2018 年 12 月 11 日
This is a datetime for today, starting at 13:15 and going to 20:59, in 1 minute [1/(24*60)] intervals.
t = datetime(2018,12,11,13,15,0):1/(24*60):datetime(2018,12,11,20,59,0)
And to check:
>> t(2)-t(1)
ans =
duration
00:01:00
  12 件のコメント
NS
NS 2018 年 12 月 12 日
Sir I have attached a sample data whherein my first column is DATETIME which are cleaned for non trading hours, holidays and weekends, outliers and second column is PRICE.
My purpose is to get all MINUTES between 13:15 to 20:59 on all DATES in cleaned sample DATES and interpolate the PRICES . I have tried -
interp1(DATETIME(1),PRICE,DATETIME(end))
But I am not getting desired result . Kindly help . I have attached sample data in excel.
NS
NS 2018 年 12 月 12 日
Thanks sir , I figured it out.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalendar についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by