MATLAB: Subplotting images with different scale

axeslinkaxesscalesubplot

Hello,
I need some help. I want to show two different images (100×100 and 400×400). I could show them in different figures respecting their scale factor, but what I would like is to show both of them in the same figure. I mean one next to the other but respecting their scale, because what Matlab do is to show both image at the same scale but I want to respect their proportion to compare them (one smaller and one bigger)
Thank you for your help.
Regards,
Daniel

Best Answer

Hi Daniel, I am not sure if I understand your question correctly, but maybe linkaxes is what you are looking for:
I1 = rand(100,100,3);
I2 = rand(400,400,3);
h1 = subplot(2,1,1);
image(I1)
h2 = subplot(2,1,2);
image(I2)
linkaxes([h2,h1])