diff options
| author | Author Name <[email protected]> | 2023-07-07 12:20:59 +0930 |
|---|---|---|
| committer | David Rowe <[email protected]> | 2023-07-07 12:29:06 +0930 |
| commit | ac7c48b4dee99d4c772f133d70d8d1b38262fcd2 (patch) | |
| tree | a2d0ace57a9c0e2e5b611c4987f6fed1b38b81e7 /octave/ofdm_time_sync.m | |
shallow zip-file copy from codec2 e9d726bf20
Diffstat (limited to 'octave/ofdm_time_sync.m')
| -rw-r--r-- | octave/ofdm_time_sync.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/octave/ofdm_time_sync.m b/octave/ofdm_time_sync.m new file mode 100644 index 0000000..6c14627 --- /dev/null +++ b/octave/ofdm_time_sync.m @@ -0,0 +1,22 @@ +% ofdm_time_sync.m +% David Rowe June 2019 +% +% Tests ofdm modem sync time, using real, off air files + +function ofdm_time_sync(filename, Ntrials=10) + + time_to_sync = []; passes = fails = 0; + for toffset=0:Ntrials-1 + atime = ofdm_ldpc_rx(filename, mode="700D", interleave_frames = 1, "", start_secs=toffset, len_secs=5); + if atime != -1 + passes++; + time_to_sync = [time_to_sync atime]; + else + fails++; + end + end + printf("pass: %d fails: %d mean: %3.2f var %3.2f\n", passes, fails, mean(time_to_sync), var(time_to_sync)); + figure(1); clf; plot(time_to_sync); +endfunction + + |
