clear clc CSV = csvread('wave.csv'); %CSV = csvread('wave_no_connect.csv'); x = CSV(:,1); y = CSV(:,2); % figure % plot(x, y); Fs = 1/(x(2)-x(1)); L = length(y); t = (0:L-1)'/Fs; hfft = dsp.FFT(); Y = step(hfft, y); Yabs = 2*abs(Y(1:(L/2))/L); Ylog = 10*log10(Yabs); X = Fs/2*linspace(0,1,L/2); hFig = figure; set(hFig, 'Position', [100 100 1600 900]); plot(X / 1e6, Ylog); title('Rigol DS1054Z Spectrum'); xlabel('Frequency (MHz)'); ylabel('10*log10(|Y(f)|)'); % xlim('auto'); ylim([-70,-20]); set(gcf,'PaperUnits','inches','PaperPosition',[0 0 16 9]) print -dpng wave_whip_antenna.png -r72 % xlim([85,108]); % ylim('auto') % print -dpng wave_radio_stations.png -r72 % % xlim([.095,.105]); % ylim('auto') % print -dpng wave_doh.png -r72 %