function [u,d,v]=SVDDirect(A)
[m,n]=size(A);
if (m>n|m==n)
    [p,j,q]=BiDiag(A);
    [u1,d,v1]=SVDUpBidiag(j);
    u=p*u1;
    v=q*v1;
end
if (m<n)
    [p,j,q]=BiDiag(A');
    [u1,d,v1]=SVDUpBidiag(j);
    v=p*u1;
    u=q*v1;
    d=d';
end