How can i use imshow to read matrix??

3 views (last 30 days)
Dart Min
Dart Min on 2 Dec 2019
Hey guys. I have a 5x5 matrix and this matrix concludes 25 different image(jpg).All images are 64x64.
For explain A(1,1)=image1.jpg A(1,2)=image2.jpg...... A(5,5)=image25.jpg.
But when i want to use imshow(A) this error comes: imshow: IM must be an image or the FILENAME of an image
I must use imshow becaouse this is my hmwork.
What did i wrong? Help me please.

Answers (1)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH on 2 Dec 2019
solution:
A=reshape(split(num2str(1:25,'image%i.jpg ')),5,5)';
figure
imshow(cell2mat(cellfun(@imread,A,'uni',false)))

Categories

Find more on Display Image 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!