
%  array_to_string.m  ver 1.0  by Tom Irvine

function[ss]=array_to_string(A)

    sz=size(A);

    for i=1:sz(1)
        for j=1:sz(2)
            if(j==1 && i==1)
                ss=(sprintf(' %8.4g',A(i,j)));                  
            else    
                sa=strtrim(sprintf('%8.4g',A(i,j))); 
                ss=sprintf('%s\t%s',ss,sa);
            end    
        end
        ss=sprintf('%s\n',ss);
    end    
