clc clear all close all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Una señal que es un pulso cuadrado, si tiene duración diferente conservando la amplitud ¿qué ocurre con el espectro? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% t = -3:0.01:7; T0 = 5; a = 0.5; t1 = t - T0; x = rectpuls(t1,a); X = fft(x); subplot(3,3,1) plot(t,x), axis([-5 8 -1 4]) subplot(3,3,4) plot(real(X)) x = rectpuls(t1,a/2); X = fft(x); subplot(3,3,2) plot(t,x), axis([-5 8 -1 4]) subplot(3,3,5) plot(real(X)) x = rectpuls(t1,a*2); X = fft(x); subplot(3,3,3) plot(t,x), axis([-5 8 -1 4]) subplot(3,3,6) plot(real(X))