reshape — creation of a ts from a vector
ts=reshape(mat,datin,indw)
mat = a (1 x nobs) or (nobs x 1) vector
datin = a date string
indw = 'w' if the time series is weekly (optional)
ts = the corresponding time series
1) x = reshape([21:44],'1a') 2) x = reshape([1:24]','1985q1') 3) x = reshape(y,'1985/12/01') 4) x = reshape(y,'1985/12/01','w') Example 1 creates an annual ts, from the year 1 to the year 24, with values 21 to 44. Example 2 creates a quarterly ts, from the first quarter of 1985 to the last quarter of 2000, with values 1 to 24. Note that the data are given as a row vector in example 1 and a column vector in example 2: it doesn't matter, provided that you don't give a matrix with more than one dimension. Example 3 creates a daily ts, from december 1985 the first until a date determined by the length of the -supposed-vector y and with values equal to that of vector y. Example 4 creates a weekly ts, from the week of december 1985 the first until a week determined by the length of the -supposed-vector y and with values equal to that of vector y.