hello I have to dates 17/04/2007 and 15/12/2007 and i need the hourly data for these date from file of 8760?
1 次查看(过去 30 天)
显示 更早的评论
hello, I have to dates 17/04/2007 and 15/12/2007 and I need the hourly data for these date from a file of 8760? i mean hourly data of those dates?
0 个评论
采纳的回答
Star Strider
2016-8-29
See if this does what you want:
DN = datenum({'17/04/2007'; '15/12/2007'}, 'dd/mm/yyyy');
Hourly = [DN(1) : (1/24) : DN(2)]'; % Date number Vector
HourlyStr = datestr(Hourly, 'dd/mm/yyyy HH'); % Date String Character Array
2 个评论
Star Strider
2016-8-29
My pleasure.
I need to know the format of your data, and what you want as the result. It would help if you upload (attach) your data as a .mat file so I have it to work with.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!