function C=compressimage(k)
    A=imread('einstein.jpg');
    B=A(:,:,1);
    B=im2double(B);
   % imshow(B);
    [U,S,V]=svd(B);
    [m,n]=size(S);
    n=min(m,n);
   % plot([1:n,diag(S),'.');
   % axis([-10,n+1,0,300]);
   % hold on
   C=diag(S)';
    for i=k+1:n
        S(i,i)=0;
    end
    B=U*S*V';
    imshow(B);
    C=C'
end