Day of Year to MATLAB date
by Ashley
22 May 2009
(Updated 22 May 2009)
Converts a day of year number and a year to a date in MATLAB format
|
Watch this File
|
| File Information |
| Description |
DOY2DATE.m will convert a vector of day of year numbers and years
and convert them to MATLAB date format.
Sample Call:
doyV = [54;200.4315];
yearV = [2009;2009];
[dateV] = doy2date(doyV,yearV);
Inputs:
doyV -> vector of day of year numbers (n x 1)
yearV -> vector of years (n x 1)
Outputs:
dateV -> vector of MATLAB dates (n x 1)
function [dateV] = doy2date(doyV,yearV)
z = zeros(length(yearV),5);
dv = horzcat(yearV,z);
dateV = doyV + datenum(dv); |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
Date to Decimal Day of Year
|
| MATLAB release |
MATLAB 7.4 (R2007a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 22 May 2009 |
fixed typo in title |
|
Contact us at files@mathworks.com