fid = fopen('DAT_0942_A1.rd3','r'); [A, COUNT]=fread(fid, [656,1], 'short'); Fs=4180799805 % sampling frequency T = 1/Fs; % Sampling period L = 656; % Length of signal t = (0:L-1)*T; % Time vector figure(8) plot(t,A) title('GPR TRACE A(t)') xlabel('Time s)') ylabel('|Amplitude') Y=fft(A); P2 = abs(Y/L); P1 = P2(1:L/2+1); P1(2:end-1) = 2*P1(2:end-1); f = Fs*(0:(L/2))/L; figure(9) plot(f,P1) title('Single-Sided Amplitude Spectrum of A(t)') xlabel('f (Hz)') ylabel('|P1(f)|') fclose(fid);