MATLAB Answers


How to substitute call to imshow() with image()

Asked by max
on 30 Jun 2013


I'm new to matlab. I do not own the Image Processing Toolbox required to use imshow().

I want to run some code that includes this line:

imshow([im1 im2]);

Where im1 and im2 come from a call to imread() and are manipulated in the code. I tried this:

image([im1 im2]);

But it doesn't work. It displays im2 twice instead of 1 and 2 next to each other.

I tried to switch the arguments around:

image([im2 im1]);

And it works fine, the problem is: that's not what I want. I want to see im1 on the left and im2 on the right.

What's the problem here? Thanks for your help


2 Answers

Answer by Wayne King
on 30 Jun 2013

I don't have any trouble with this:

    X = randi(256,256,'uint8');
    Y = imread('cameraman.tif');
    image([X Y]); axis off;


Answer by Nitin
on 1 Jul 2013

If you don't have the IPT, try using imdisp from file exchange


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!