how I can make a sequence of hourly data of days for years from 2000-2010?

2 views (last 30 days)
how I can make a sequence of hourly data of days for years from 2000-2010?
  1 Comment
Geoff Hayes
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?

Sign in to comment.

Answers (1)

Star Strider
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
Matlab1
Matlab1 on 27 Nov 2014
Edited: Matlab1 on 27 Nov 2014
Many thanks.
The thing is that the result is in the vector format (all in the first row). I need them to be vertically than horizontally in the spread sheet.
Also, this column now is the standard column. I have a column which is demand of electricity with some missing values among rows; however, their cell are not clear, or empty or... I need to match the standard column and the demand column to figure out the place of the missing values and allocate rows for missing values and put NAN for them.
Would you please help me in this case?
Star Strider
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.

Sign in to comment.

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!