Error in storing values
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a code
for xx = 1:length(dirlist(1:2))
x = imread([pathname, dirlist(xx).name]);
x=rgb2gray(x);
x=double(x);
n = numel(x);
A1_20 = repmat(A,[1,1,20]);
t = ones(size(A));
for j1 = 1:size(A1_20,3)
p = t;
p(randi(n,3000,1)) = 0;
A1_20(:,:,j1) = A1_20(:,:,j1).*p;
w{j}{s1}{s2} =A1_20(:,:,j1);
y1 = idualtree2D(w, J, Fsf, sf);
Er= mean2((single(x) - single(y1)).^2);
final_col2{xx}=min(Er)
% figure,imshow(uint8(y1))
Er1= mean2((single(x) - single(y1)).^2)/20;
Mse{j1}=Er1
end
end
end
end
end
i have taken two images,Mse{j1} stores error for only second image,i want even for 1st image to be stored,the second image error values is overwriting the first ,please help how to store both
댓글 수: 2
Jan
2012년 5월 22일
What is the difference to your last questions http://www.mathworks.com/matlabcentral/answers/39045-displaying-the-image ?
Posting duplicate questions wastes the time of the ones, who want to assist you voluntarily. I appreciate, that you've formatted the code this time, but you still hesitate to do this in the other thread and you do not reply to my questions there. Therefore I assume, that you do not want me to help you and that's ok.
채택된 답변
the cyclist
2012년 5월 22일
I haven't looked in detail, but it looks like the variable xx counts over your images? So, if you replace this line
Mse{j1}=Er1
with this
Mse{xx,j1}=Er1
do you get everything you want stored in Mse?
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!