
close all
N=2048*2;
H1=abs(fftshift(fft(h1,N)));
H2=abs(fftshift(fft(h2,N)));
%OPCIONALES
H3=abs(fftshift(fft(h3,N)));
H4=abs(fftshift(fft(h4,N)));




fs=1/dt;
fn=fs/2;
f=fs*[0:N-1]/N-fn;
subplot(2,1,1)
semilogx(f,10*log10(abs(H1).^2),f,10*log10(abs(H2).^2));xlim([0 10000]);legend('MIC 1','MIC 2')
title(['ESPECTRO MUESTREADO A  ',num2str(fs),'Hz']);xlabel('FRECUENCIA (Hz)') 
grid on
subplot(2,1,2)
plot((1:maxtt*maxttt)*dt*1000,h1,(1:maxtt*maxttt)*dt*1000,h2);legend('MIC 1','MIC 2');xlabel('TIEMPO(ms)'),grid on 

%OPCIONALES
figure
subplot(2,1,1)
semilogx(f,10*log10(abs(H3).^2),f,10*log10(abs(H4).^2));xlim([0 10000]);legend('MIC 3','MIC 4')
title(['ESPECTRO MUESTREADO A  ',num2str(fs),'Hz']);xlabel('FRECUENCIA (Hz)') 
grid on
subplot(2,1,2)
plot((1:maxtt*maxttt)*dt*1000,h3,(1:maxtt*maxttt)*dt*1000,h4);legend('MIC 3','MIC 4');xlabel('TIEMPO(ms)'),grid on

