ts2vec — transforms a ts into a vector
vecout=ts2vec(ts,arg1, ,argn)
ts = a time series (between quotes or not)
argi =
- a date strings (in even number) corresponding to the bounds over which the values are taken
- or a (1 x 2*n) vector of date strings corresponding to the bounds over which the values are taken (optional : if not provided, the function operates over the whole time range of the series)
vecout = (N x 1) vector
Assume that x is a ts defined over the period '1954m1' - '2002m5' then 1) y = ts2vec(x,'1960m1','1989m12') 2) y = ts2vec('x',['1960m1' '1989m12']) 3) y = ts2vec(x,'1960m1','1989m12','2000m1','2002m5') 4) y = ts2vec(x,['1960m1' '1989m12' '2000m1' '2002m5']) Examples 1 and 2 do the same thing: take the values of ts y over the period '1960m1' to '1989m12'. Examples 3 and 4 do the same thing: take the values of ts y over the period '1960m1' to '1989m12' and then '2000m1' to '2002m5'.