//This function converts a one dimensional time series to
//an array of m X n matrix given by user along with original time series x
// Example usage------
//x = floor(100*rand(1,9))
// x = 30. 87. 53. 30. 33. 23. 25. 85. 48.
//w=ts2array(x,4,3)
//Length of Required Matrix is more than original series length
// Hence, 3 zeros will be appended in original time series
// w =
// 30. 87. 53.
// 30. 33. 23.
// 25. 85. 48.
// 0. 0. 0.
//w=ts2array(x,4,2)
//Length of Required Matrix is less than original series length
// Hence, 1 end data points of series will be lost
// w =
// 30. 87.
// 53. 30.
// 33. 23.
// 25. 85.