diff options
| author | Marin Ivanov <[email protected]> | 2025-07-25 10:17:14 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2026-01-18 20:09:26 +0200 |
| commit | 0168586485e6310c598713c911b1dec5618d61a1 (patch) | |
| tree | 6aabc2a12ef8fef70683f5389bea00f948015f77 /octave/ofdm_demod_c.m | |
* codec2 cut-down version 1.2.0
* Remove codebook and generation of sources
* remove c2dec c2enc binaries
* prepare for emscripten
Diffstat (limited to 'octave/ofdm_demod_c.m')
| -rw-r--r-- | octave/ofdm_demod_c.m | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/octave/ofdm_demod_c.m b/octave/ofdm_demod_c.m new file mode 100644 index 0000000..531a649 --- /dev/null +++ b/octave/ofdm_demod_c.m @@ -0,0 +1,43 @@ +% ofdm_demod_c.m +% David Rowe April 2018 +% +% Plots data from The C OFDM demodulator ofdm_demod, in similar format to +% plots from Octave OFDM demodulator ofdm_rx.m +% +% Useful for of line analysis of a demod run + +function ofdm_demod_c(filename, mode="700D") + ofdm_lib; + more off; + + % init modem + + config = ofdm_init_mode(mode); + states = ofdm_init(config); + ofdm_load_const; + states.verbose = 0; + + load(filename); + + figure(1); clf; + plot(rx_np_log_c,'+'); + mx = 2*max(abs(rx_np_log_c)); + axis([-mx mx -mx mx]); + title('Scatter'); + + figure(2); clf; + plot(phase_est_pilot_log_c(:,2:Nc),'g+', 'markersize', 5); + title('Phase Est'); + axis([1 length(phase_est_pilot_log_c) -pi pi]); + + figure(3); clf; + stem(timing_est_log_c) + title('Timing Est'); + + figure(4); clf; + plot(foff_hz_log_c) + mx = max(abs(foff_hz_log_c))+1; + axis([1 max(length(foff_hz_log_c),2) -mx mx]); + title('Fine Freq'); + ylabel('Hz') +endfunction |
