From a663f5b481679d8a352c668825cee92f548f3fcc Mon Sep 17 00:00:00 2001
From: trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Sun, 10 Jun 2007 18:16:11 +0000
Subject: Merging OFDM features branch r5661:5759 into trunk. OFDM works over
 the air with BPSK and QPSK modulations on subcarriers. Passes make distcheck.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5761 221aa14e-8319-0410-a670-987f0aec2ac5
---
 gnuradio-examples/python/ofdm/plot_ofdm.m | 65 +++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100755 gnuradio-examples/python/ofdm/plot_ofdm.m

(limited to 'gnuradio-examples/python/ofdm/plot_ofdm.m')

diff --git a/gnuradio-examples/python/ofdm/plot_ofdm.m b/gnuradio-examples/python/ofdm/plot_ofdm.m
new file mode 100755
index 0000000000..87eae3a116
--- /dev/null
+++ b/gnuradio-examples/python/ofdm/plot_ofdm.m
@@ -0,0 +1,65 @@
+function plot_ofdm(fft_size, occ_tones)
+
+ofdm = read_complex_binary('ofdm_corr_out_c.dat');
+ofdm_split = split_vect(ofdm, occ_tones);
+
+fftc = read_complex_binary('fft_out_c.dat');
+fftc_split = split_vect(fftc, fft_size);
+
+figure(1)
+set(gcf, 'Position', [50 50 1000 600]);
+
+a = size(ofdm_split);
+if nargin == 3
+    maxcount = count;
+    if maxcount > a(1)
+        error('plot_ofdm:tolong', 'Requested count size exceeds size of vectors');
+    end
+else
+    maxcount = a(1);
+end
+
+for i = 1:20000
+    x = ofdm_split(i,:);
+    y = fftc_split(i+1,:);
+    
+    subplot(2,2,1)
+    plot(real(x), imag(x), 'bo')
+    set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
+    axis([-1.5, 1.5, -1.5, 1.5])
+    title('I&Q Constellation', 'FontSize', 36);
+    xlabel('Inphase', 'FontSize', 32);
+    ylabel('Quadrature', 'FontSize', 32);
+    
+    subplot(2,2,3)
+    plot(angle(x*j), 'bo')
+    set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
+    axis([0, occ_tones, -3.5, 3.5])
+    title('Equalized Symbol Angle', 'FontSize', 36);
+    xlabel('Bin Number (Occ. Tones)', 'FontSize', 32);
+    ylabel('Symbol Angle', 'FontSize', 32);
+    
+    subplot(2,2,2)
+    plot(angle(y*j), 'bo')
+    set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
+    axis([0, fft_size, -3.5, 3.5]) 
+    title('Unequalized Symbol Angle', 'FontSize', 36);
+    xlabel('Bin Number (FFT Size)', 'FontSize', 32);
+    ylabel('Symbol Angle', 'FontSize', 32);
+    
+    Y = 20*log10(abs(y) ./ max(abs(y)));
+    subplot(2,2,4)
+    plot(Y, 'b-')
+    set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
+    axis([0, fft_size, -50, 1]);
+    title('Frequency Domain of Unequalized Rx', 'FontSize', 36);
+    xlabel('Bin Number (FFT Size)', 'FontSize', 32);
+    ylabel('Power (dB)', 'FontSize', 32);
+    
+    %     N = 20*log10(var(abs(x)-1))
+    
+    disp(sprintf('Symbol Number: %d\n', i))
+%     disp(sprintf('\tFreq Error: %f\n', anglesh_pn(1+(i-1)*fft_size)))
+    pause
+
+end
-- 
cgit v1.2.3