function [A,u,sig,v]=generateMatrix(m,n,d)

u=rand(m,m);v=rand(n,n);
d=sort(d,'descend');
sig=diag(d);
if (m<n)
    sig(:,m+1:n)=zeros(m,n-m);
end
if(m>n)
    sig(n+1:m,:)=zeros(m-n,n);
end
u=GSO(u);v=GSO(v);A=u*sig*v';
    
    