im trying to make array of images s1,s2,s3 and s4 and want to show them in different figures ........... what is wrong over there? .........
显示 更早的评论
clc close all clear all arr={s1,s2,s3,s4}; for i=1:4 b=imread(arr{i}); figure,imshow(arr{i}); end
采纳的回答
更多回答(1 个)
Image Analyst
2013-6-5
s1, s2, s3, and s4 need to be strings that contain the actual filenames. If you do that, it will work. For example:
% Define the filenames:
s1 = 'moon.tif';
s2 = 'cameraman.tif';
s3 = 'peppers.png';
s4 = 'football.jpg';
arr={s1,s2,s3,s4};
% Display each in a new figure.
for i=1:4
b=imread(arr{i});
figure;
imshow(arr{i});
end
You may be interested in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
类别
在 帮助中心 和 File Exchange 中查找有关 Image Preview and Device Configuration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!