Small simple question about displaying multiple pictures or objects

조회 수: 1 (최근 30일)
Steve
Steve 2012년 6월 15일
Hello Experts,
Consider I have n pictures or matrices. I want to display them all in n different figures. Please tell me how to make it efficient and in a smart way.
Thanks a lot in advance.

채택된 답변

Ryan
Ryan 2012년 6월 15일
% Generate random pictures
PicNum = 5;
PicSize = 100;
J = zeros(PicSize,PicSize,PicNum); % Always good to preallocate
for n = 1:PicNum
J(:,:,n) = rand(PicSize,PicSize)*255;
end
% Display those pictures
for m = 1:PicNum
figure;imshow(J(:,:,m))
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by