Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Help
Replies: 1   Last Post: Mar 23, 2013 1:35 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
dpb

Posts: 8,290
Registered: 6/7/07
Re: Help
Posted: Mar 23, 2013 1:35 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/23/2013 12:21 PM, Emmanuel Ndetto wrote:
> Hello everyone,
>
> I would like to create a date vector with with only hours of the day
> starting from 06 to 18 but after every 4 hours time interval.
>
> the starting date may be for example 07-Jan-2012 06:00 and ending on 31
> - Dec- 2015 18:00.
>
> The hourly intervals should be 4 hours.


doc datenum
doc datevec

and friends.

I can't parse the first sentence but note that you can use a vector of
any time interval as input and datenum() is clever enough to convert to
the proper calendar time accounting for days of month, leap years, etc.,
etc., ...

So, an hour vector of [0:4:nHours] where nHours is the number of hours
in the overall time span desired is good when combined w/ the start
yr,mo,da.

--




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.