clear all; clc; %% raw data plot + fft for one chirp /w 256 samples numFrames = 10; a = readDCA('raw_files/slope60-50_start770-774_32chirps.bin', numFrames); %% global variables % change based on sensor config %---------------------------------------------------------------------- numADCSamples = 256; numChirps = 32; sampleRate = 5; % [Msps] timeStep = 1/sampleRate; % [us] chirpPeriod = numADCSamples * timeStep % [us] plotEnd = numADCSamples * numChirps * numFrames; timeEnd = (plotEnd-1) * timeStep; %---------------------------------------------------------------------- sample = (0:1:plotEnd-1); time = (0:timeStep:timeEnd); f = (0:1:plotEnd-1); f_bin = (0:1:length(a)-1); real = a(:,1); % ADC0 data only imag = a(:,5); b = fft(real(1:plotEnd))/plotEnd; c = fft(imag(1:plotEnd))/plotEnd; figure(1); subplot(3,1,1); hold on; plot(sample, real(1:plotEnd),'b'); plot(sample, imag(1:plotEnd),'r'); title('IQ time domain signal'); xlabel('sample #'); ylabel('adc value'); subplot(3,1,2) plot(time, real(1:plotEnd),'b'); xlabel('time [us]'); ylabel('adc value'); %figure(2); subplot(3,1,3); hold on; title('FFT signal with mirror'); plot(f, abs(b), 'b'); %plot(f, abs(c),'r');