Documentos de Académico
Documentos de Profesional
Documentos de Cultura
ft=heaviside(t+a)-heaviside(t-a);
gt=heaviside(t+a);
Fw=fourier(ft)
Gw=fourier(gt)
Fw=simplify(Fw)
Gw=simplify(Gw)
figure(1)
ft=subs(ft,a,1);
subplot(2,1,1)
ezplot(ft,[-5,5]);
ylim([-0.2 1.2])
xlabel('t');
ylabel('f(t)')
title('Escalon unitario')
Fw=subs(Fw,a,1);
subplot(2,1,2)
hg=ezplot(Fw,[-10,10]);
set(hg,'color','r')
ylim([-1 2.2])
xlabel('\omega');
ylabel('F(\omega)')
title('Transformada de Fourier')
grid on
% figure(2)
% gt=subs(gt,a,0);
% subplot(2,1,1)
% ezplot(gt,[-10,10]);
% ylim([-0.2 1.2])
% xlabel('t');
% ylabel('g(t)')
% title('Escalon Unitario')
% Gw=subs(Gw,a,1);
% subplot(2,1,2)
% hg2=ezplot(Gw,[-10,10]);
% set(hg2,'color','r')
% ylim([-1 2.2])
% xlabel('\omega');
% ylabel('F(\omega)')
% title('Transformada de Fourier')
% grid on
% .................
% x=-5:0.05:5;
% mu=[0,0,0,-2]; %media
% col=['b','g','r','k'];
% hold on
% for k=1:length(s2)
% y=exp(-(x-mu(k)).^2/(2*s2(k)))/sqrt(s2(k)*2*pi);
% str=sprintf('\\mu=%1.1f, \\sigma^2=%1.1f',mu(k),s2(k));
% plot(x,y,col(k),'displayName',str)
% end
% hold off
% xlabel('x')
% ylabel('f(x)')
% legend('-DynamicLegend','location','NorthEast')
% title('Funcin de Gauss')
% grid on
% -----------------------------------------------------
t=linspace(-7,7,100);
figure(3)
sigma=2;
ht=exp(-t.^2/(2*sigma^2))/(sigma*sqrt(2*pi));
subplot(2,1,1)
plot(t,ht,'b');
ylim([-0.05 0.25])
xlabel('t');
ylabel('h(t)')
title('Funcin de Gauss')
w=linspace(-7,7,100);
hw=exp(-w.^2*sigma^2/2);
subplot(2,1,2)
plot(w,hw,'r');
ylim([-0.2,1.2])
xlabel('w');
ylabel('H(w)')
grid on
% ------------------------------------------