1

Let's say the following is my MatLab command. They are being entered in sequence.

I = imread('C:\Documents and Settings\Guest\Desktop\test.jpg'); imshow(I); imhist(I); 

After line 2 is executed, MatLab invokes a window displaying the image "I". Line 3 will display the histogram of "I". The histogram will replace the image (in the same window).

What I want to do is:

  1. I would like to maintain my image window (let's called it "Figure 1" window)

  2. The histogram is invoked in another window ("Figure 2")

Can someone please advise me on this?

1 Answer 1

4

You can try using figure

I = imread('C:\Documents and Settings\Guest\Desktop\test.jpg'); figure(1); imshow(I); figure(2); imhist(I); 
Sign up to request clarification or add additional context in comments.

1 Comment

Also, if you want to you can produce both on the same figure---look up the subplot command.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.