error in storing values

조회 수: 1 (최근 30일)
FIR
FIR 2012년 5월 23일
I have a code in which i process two images
for xx = 1:length(dirlist(1:2))
x = imread([pathname, dirlist(xx).name]);
x=rgb2gray(x);
.
.
.
.
.
.
PSNR = 20 * log10 (255 / sqrt(S));
PSNR(:,xx)=PSNR
end
i have calculated PSNR for two images i get different values of PSN for each image,but wen i concatanate 2 values of PSNR i get same value ,please help
for ex wen i process
PSNR =
38.8500
PSNR =
39.8618
PSNR =
39.8618 39.8618
please help

채택된 답변

Wayne King
Wayne King 2012년 5월 23일
Don't use the same variable below, use a different variable.
PSNR = 20 * log10 (255 / sqrt(S));
PSNRS(xx) =PSNR;

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by