Clear Filters
Clear Filters

Figure を 全画面表示させる方法はありますか?

116 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 9 May 2016
Figure を画面いっぱいに表示させる方法を教えてください。

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Nov 2018
Edited: MathWorks Support Team on 16 Nov 2018
■ R2018a 以降の場合
Figure ハンドルの WindowState プロパティを 'maximized'とすることにより可能です。
h = figure
RGB = imread('peppers.png');
imshow(RGB)
h.WindowState = 'maximized' %WindowStateプロパティにて最大化
■ R2017b 以前の場合
スクリーンサイズを事前に取得し、Figure の Position プロパティに設定します。
f1 = figure ;
set( f1, 'menubar', 'none')
set( f1, 'position', get(0, 'screensize'))
また、Computer Vision Toolbox の DeployableVideoPlayer を用いる方法もあります。
具体的には、次のように実行します。
(全画面表示を解除するには、Esc キーをタイプしてください。)
% モニターのサイズを取得
mpos = get(0,'MonitorPositions')
% サンプル画像読み込み
I = imread('cameraman.tif');
% DeployableVideoPlayer オブジェクトの定義
depVideoPlayer = vision.DeployableVideoPlayer;
depVideoPlayer.Location = mpos(1,1:2); % モニタの開始点を設定
depVideoPlayer.Size = 'Full-screen'; % 全画面表示に設定
step(depVideoPlayer,I) % オブジェクトによる表示
release(depVideoPlayer) % リリース

More Answers (0)

Products


Release

R2012a

Community Treasure Hunt

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

Start Hunting!