Can someone tell me what my mistake is?

1 view (last 30 days)
Kaitlyn
Kaitlyn on 11 Apr 2015
Edited: Stephen23 on 12 Apr 2015
[A,map]=imread('C:\Users\s514835\Desktop\calvinhobbs.gif');
B=im2double(A);
imshow(B);colormap(gray)
[u,s,v]=svd(B);
C=zeros(size(B));
for j=1:30
C=C+s(j,j)*u(:,j)*v(:,j).';
end
figure
imshow(C,[]);colormap(gray)
drawnow
  1 Comment
Stephen23
Stephen23 on 12 Apr 2015
Edited: Stephen23 on 12 Apr 2015
We can't read your mind and "know" what that code "should" do. How do we know what your algorithm is? You need to help us understand by actually explaining what you expect to happen, and what is currently happening with the code that you have.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 11 Apr 2015
Well two of them are not having comments, and not formatting your code for this forum. The latter can be fixed by viewing this. I guess a third thing is not telling us what you think is wrong, or telling us any error messages. That can be fixed by reading this.

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!