Why it does not display the two images in the same window using the subplot function?

This is the code:
>> a = imread('peppers.png');
>> b = imread('moon.tif');
>> subplot(1,2,1), imshow(a)
>> subplot(1,2,2), imshow(b)
Why first show the first figure and then the second but in two different screens and not in the same?

3 件のコメント

Matt J
Matt J 2018 年 3 月 14 日
編集済み: Matt J 2018 年 3 月 14 日
What version of MATLAB? Maybe try rebooting.
Image Analyst
Image Analyst 2018 年 3 月 14 日
It works fine for me.
matlab9000
matlab9000 2018 年 3 月 22 日
Ok, i solved

サインインしてコメントする。

回答 (1 件)

Matt J
Matt J 2018 年 3 月 13 日
編集済み: Matt J 2018 年 3 月 13 日

0 投票

The only reason I can think of is that maybe you have some MATLAB GUI application running asynchronously in the background, and which changes the current MATLAB figure behind your back.

製品

タグ

質問済み:

2018 年 3 月 13 日

コメント済み:

2018 年 3 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by