function [u,d,v]=SVDBidiag(B)
[m,n]=size(B);
C(1:n,n+1:m+n)=B';
C(n+1:m+n,1:n)=B;
p=GenerateShuff(m);
c1=p'*C*p;
[x,d]=eig(c1);
x1=fliplr(x);
d1=fliplr(flipud(d));
d=d1(1:m,1:m);
x1=x1(:,1:m);
x1=x1*2^(.5);
for i=1:m
    v(i,:)=x1(2*i-1,:);
    u(i,:)=x1(2*i,:);
end
