problems with a for loop within a switch statement
Show older comments
I am creating a code where there is a for loop within a switch statement. I want the switch statement in there because I want to evaluate an expression, (SSIM), then for each time it is evaluated I want it to pick out values between 0 to 1 or from -1 to 1. But I am having trouble, and am not sure, how to set this up. Here is what I have so far:
ref = picture2
A = picture1
subplot(1,2,1); imshow(ref); title('Mode 1');
subplot(1,2,2); imshow(A); title('Mode 2');
fprintf('The SSIM value is %0.4f.\n',ssimval);
switch [ssimval, ssimmap] = ssim(A,ref);
case i := 1:
for i from 0 to 1 do
a := <i;
fprintf('The SSIM value is %0.4f.\n',ssimval);
figure, imshow(ssimmap,[]);
title(sprintf('ssim Index Map - Mean ssim Value is %0.4f,',ssimval));
otherwise
title(sprintf('ssim Index Map - Mean ssim Value is %0.4f does not fit within criteria,',ssimval));
end
Any suggestions? Thanks to all and to all a good night (except for the best Answerer :p) - Neo
Accepted Answer
More Answers (0)
Categories
Find more on Image Quality 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!