[Y, M, D, H, MN, S] = datevec(dv)
V = datevec(dv)
| Parameter | Description |
|---|---|
| dv | a scalar, vector, multidimensional array, or sparse double matrix: a serial date number. |
| Parameter | Description |
|---|---|
| Y, M, D, H, MN, S | double: Year, Month, Day, Hour, Minutes, Seconds. |
| V | a vector of double: [Year, Month, Day, Hour, Minutes, Seconds]. |
datevec converts a serial date number into a date vector.
For sparse input, datevec converts the stored nonzero values and returns dense outputs.
To measure performance, it is better to use tic and toc functions.
datevec(now())
datevec(720840)
V = datevec([720840, now()])
[Y, M, D, H, MN, S] = datevec([720840, now()])
V = datevec(sparse([720840, now()]))
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 2.0.0 | sparse double input supported natively |