Grocer Function

NAME

date2num_m - transforms a matrix of dates into numbers

CALLING SEQUENCE

num=date2num_m(dat)

PARAMETERS

Input

Output

DESCRIPTION

Transforms a matrix of dates into their numerical representation.

EXAMPLE

1) v = date2num_m(['1a' '2a' '3a' '4a'])
2) v = date2num_m(string([1:4])+'a')
3) v= date2num_m(['1975q1'; '1985q2'])

The first 2 examples give the same result: the vector [1:4]
Note:
1] the transformation of the constant vector [1:4] into the corresponding string
2] the fact that in scilab you can add a (1x1) matrix-here the car 'a'- to any vector or matrix, the (1x1) is then added to every entry of this matrix): the (1x4) vector [1:4] = [1 2 3 4].
The third example gives the (2x1) vector [7901; 7942]

AUTHOR

Eric Dubois 2002