function ejemploruido(N); M=1024; if(N>M) M=N; end x=randn(N,50); S=abs(fft(x,M)).^2/N; SM=mean(S'); subplot(211) plot(linspace(0,0.5,M/2),10*log10(S(1:M/2,:))); grid on; ylabel('Densidad Spectral Potencia (dB)') xlabel('frecuencia'); subplot(212) plot(linspace(0,0.5,M/2),10*log10(SM(1:M/2))) grid on ylabel('Densidad Spectral Potencia (dB)') xlabel('frecuencia');