function y = array2ts(x)
    //This function converts m X n matrix to a one dimensional time series 
    clc();
    A = x';
    [m,n] = size(A);
        
    z=[];
    
    //for k=1:1:n
            for j=1:1:m
            p = A(((j-1)*n+1):(j*n));
            z = [z ;p];
            end
   // end
    
    y= z';
endfunction
