View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 2.49 KB File ID: #35212 Version: 1.0




Find hours in anyday, and correction term on order to correct to normalized time.

| Watch this File

File Information

Function that take datevalue/datevector as argument, and return number of hours for each day.

The user can also give datevalues that correspond to hourly values, and get at correction term in order to correct hour values in DST-format to normalized time.

MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
06 Jun 2012 Gunnar Aronsen

If you give in a date and set correction = 0 then you get the number of hours in that day. On the day when adjusting the clock forward it will give 23 as output and 25 when we adjust the clock backward.

I correction = 1 and you give in a vector of datevalues that also contain hour informastion, then you will get -1 during the hours which is part of what we call summertime in Norway. This vector can you then subtract from the time value given in, and then you get all timevalues are in normalized time. The last functionality is ment to be used when working towards databases which operate in normalized time, that is not taking into account daylight saving time.

Comment only
05 Jun 2012 David Goldsmith

Hi, Gunnar. Perhaps it's a language thing, but I find your description very obscure--could you please provide some examples of what it does? Thanks!

Comment only

Contact us