Skip to content

Commit

Permalink
restructuration
Browse files Browse the repository at this point in the history
  • Loading branch information
arnauochoa committed Nov 25, 2020
1 parent 7436b13 commit 90ec634
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 36 deletions.
36 changes: 0 additions & 36 deletions main.m
Original file line number Diff line number Diff line change
@@ -1,36 +0,0 @@
clear; close all; clc;

filepath = 'test_real_long.dat';

Nsamp = 500*4096;
signal = DataReader(filepath, Nsamp);

N = 2^20;
fIF = 4.348e6; %Hz
fs = 23.104e6; %Hz

s = signal(1:Nsamp);

omega = linspace(-2*pi, 2*pi, 2*N);

figure
plot(s(1:200), 'o-');

figure;
histogram(s);
title('Quantized signal in time domain');
xlabel('k');


[Swelch, fwelch] = pwelch(s, 256, 0, 256, fs);
figure
plot(fwelch./1e6, 10*log10(Swelch)); hold on;
xline(fIF/1e6);
xlabel('f (MHz)'); ylabel('PSD (dB/Hz)');
title('Welch periodogram');






29 changes: 29 additions & 0 deletions rx_signal_analysis.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
clear; close all; clc;

filepath = 'test_real_long.dat';

Nsamp = 500*4096;
signal = DataReader(filepath, Nsamp);

N = 2^20;
fIF = 4.348e6; %Hz
fs = 23.104e6; %Hz

s = signal(1:Nsamp);

omega = linspace(-2*pi, 2*pi, 2*N);

figure
plot(s(1:200), 'o-');

figure;
histogram(s);
title('Quantized signal in time domain');
xlabel('k');

[Swelch, fwelch] = pwelch(s, 256, 0, 256, fs);
figure
plot(fwelch./1e6, 10*log10(Swelch)); hold on;
xline(fIF/1e6);
xlabel('f (MHz)'); ylabel('PSD (dB/Hz)');
title('Welch periodogram');

0 comments on commit 90ec634

Please sign in to comment.