problem in maximizing figure window in matlab 2016a

4 visualizaciones (últimos 30 días)
f4r3in
f4r3in el 27 de Nov. de 2019
Comentada: f4r3in el 27 de Nov. de 2019
hi everyone, I have a problem and that is when I run my script and I want to maximize my figure to see it obviously , it doesn't maximize.
and I have to see the figure to enter some inputs to my script.
I attach my problem's pictures and also my input file and my script below.
clc
clear
endyear=1406;
load('alef');
Input=alef;
Ybj=Input(:,2); % Original Yearly Peak Loads
Ybj1=diff(Ybj); % First Difference
Ybj2=diff(Ybj1); % Second Difference
subplot(4,2,1)
autocorr(Ybj)
subplot(4,2,2)
parcorr(Ybj)
subplot(4,2,3)
autocorr(Ybj1)
subplot(4,2,4)
parcorr(Ybj1)
subplot(4,2,5)
autocorr(Ybj2)
subplot(4,2,6)
parcorr(Ybj2)
d=input('Enter Degree of Integration (d) (0 or 1 or 2)= ');
if d==0
Diff=Ybj;
wt=1;
elseif d==1
Diff=Ybj1;
wt=[1 1];
elseif d==2
Diff=Ybj2;
wt=[1 -2 1];
end
p=input('\nEnter Autoregressive Order (p) : ');
q=input('\nEnter Moving Average Order (q) : ');
close
Z=iddata(Diff,[],1);
m=armax(Z,[p q])
resid(m,Z)
so what can I do to solve this problem and see the figure full screen???
also I have read problem in below link but I can't understand what should I do to solve it. please help with more detail.
  2 comentarios
Nicolas B.
Nicolas B. el 27 de Nov. de 2019
I haven't try your code yet, but have you already tested to call refresh() after resizing?
f4r3in
f4r3in el 27 de Nov. de 2019
non of the buttons in toolbar of figure work.
my script is like this , first I the figure is shown and user have to select the best method and then continue by own selected method. and because of that I can't write any code in my command window because I have to enter a number that input wants.

Iniciar sesión para comentar.

Respuestas (1)

ME
ME el 27 de Nov. de 2019
If you are using R2018a or after then you can use
f = figure;
f.WindowState = 'maximized';
to maximise the figure window. To be safe, you could put these two commands before you plot anything and that should ensure that the figure window is maximised before you start plotting.
If you still get the issue then try putting a pause in the script - somewhere before your input commands.
  1 comentario
f4r3in
f4r3in el 27 de Nov. de 2019
unfortunately my matlab version is 2016a.
I think this is a bug in matlab 2016a because when you plot a matrix a your code still running you can't do anything on your figure until your code's running ends.

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by