how I can make a sequence of hourly data of days for years from 2000-2010?
2 views (last 30 days)
Show older comments
how I can make a sequence of hourly data of days for years from 2000-2010?
1 Comment
Geoff Hayes
on 27 Nov 2014
Mina - please provide more details in what you are looking for. Use the body of your question to include a small sample of the sequence that you want to generate. For example, if the month is January 2000, then do you want 24*31 elements for your sequence? Should they be labelled in a certain manner?
Answers (1)
Star Strider
on 27 Nov 2014
This should do it:
DTN = datenum([2000 01 01 00 00 00]):1/24:datenum([2010 12 31 24 0 0]);
Those are obviously date numbers. Convert them to other formats as you need to.
2 Comments
Star Strider
on 27 Nov 2014
I will restate the Answer I provided to your subsequent Question:
You may not need to put NaN for the missing values. You did not post your data or a detailed description of what you want to do, so you left us guessing. See if interp1 will do what you want.
See Also
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!