clear all

fid=fopen('dac1408_npr_astrium_decimal.txt','r');
donnee=fscanf(fid,'%x',inf);
fclose(fid);

N=length(donnee);
NFFT=2^nextpow2(N);

Y=fft(donnee,NFFT)/N;

spectre=2*abs(Y(1:NFFT));
spectre_db=20*log(spectre)-100;
freq_ech=156250000;
freq=freq_ech/2*linspace(0,1,NFFT);
spectre_db(1)=0;
plot(freq,spectre_db);
