L=imread('Lenna512.jpg');
K=100;
X=L(:,:,1);
X=double(X);
 [U,S,V]=svd(X);
U1=U;
S1=S;
V1=V;
figure(1)
colormap(gray)
subplot(121)
imagesc(U*S*V')
U(:,K:512)=0;
S(:,K:512)=0;
V(:,K:512)=0;
subplot(122)
imagesc(U*S*V')
(2*512+1)*K/512^2