Set figure on small area--set(gca,'YLim',[-30 0])

x=-6:0.01:6;
G= sin(pi*x)./(pi.*x).*exp(-j*pi*x)
figure
subplot(3,1,1);
plot(x,real(G),'r',x,imag(G),'g'); xlabel('fT')
grid on;

subplot(3,1,2);
plot(x,(abs(G)).^2,'r');xlabel('fT')
grid on;

subplot(3,1,3);
plot(x,10.*log10((abs(G)).^2),'b');xlabel('fT');
set(gca,'YLim',[-30 0]);
grid on;

Set figure on small area--set(gca,'YLim',[-30 0])

原文地址:https://www.cnblogs.com/XinZhou-Annie/p/7489275.html