[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Figure not filling the window area on Octave 5 release candidate
From: |
geo |
Subject: |
Re: Figure not filling the window area on Octave 5 release candidate |
Date: |
Sun, 24 Feb 2019 07:34:43 -0600 (CST) |
And now the script...
stint=0.001; # sampling time interval (seconds)
sfreq=1/stint; # sampling frequency (Hz)
t=[0:stint:1]'; # the sampling times column-vector
N=length(t); # number of sampling points
x=cos(2*pi*10*t)+cos(2*pi*25*t)+cos(2*pi*50*t)+ ... # the signal
column-vector
cos(2*pi*100*t);
a=abs(fft(x)); # the Fourier transform
# plots
startx=20
starty=20
width=1200
height=800
fig=figure();
figure(fig, "position",[startx,starty,width,height]); ## window size
subplot(2,1,1)
plot(t,x)
ax=gca() ## axis object
set(ax, "fontsize", 12)
xlabel("Tempo (s)", "fontsize", 14)
ylabel("Amplitude", "fontsize", 14)
title("Sinal estacionário da pag. 6", "fontsize", 14);
subplot(2,1,2)
i=[1:N]';
xfreq=(i-1)*sfreq/N; # the frequencies column-vector
plot (xfreq(1:length(i)/2),a(1:length(i)/2));
ax=gca()
set(ax, "fontsize", 12)
xlabel("Frequência (Hz)", "fontsize", 14)
title("Transformada de Fourier do sinal estacionário da pag. 6",...
"fontsize", 14)
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html