diff options
author | Joshua Baer <the.baer.joshua@gmail.ch> | 2021-04-13 13:45:46 +0200 |
---|---|---|
committer | Joshua Baer <the.baer.joshua@gmail.ch> | 2021-04-13 13:45:46 +0200 |
commit | cbff191086582962c28479efffab7a14d6c60c69 (patch) | |
tree | 9989c0e350f96b31836e3cf55c742e1915388425 /buch/papers | |
parent | update to current state of book (diff) | |
parent | update fs-fft (diff) | |
download | SeminarMatrizen-cbff191086582962c28479efffab7a14d6c60c69.tar.gz SeminarMatrizen-cbff191086582962c28479efffab7a14d6c60c69.zip |
fork synced with upstream
Diffstat (limited to 'buch/papers')
-rw-r--r-- | buch/papers/reedsolomon/experiments/f.m | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/buch/papers/reedsolomon/experiments/f.m b/buch/papers/reedsolomon/experiments/f.m new file mode 100644 index 0000000..6bdc741 --- /dev/null +++ b/buch/papers/reedsolomon/experiments/f.m @@ -0,0 +1,61 @@ +# +# f.m -- Reed-Solomon-Visualisierung mit FFT +# +# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# +N = 64; +b = 32; +l = N + b; + +signal = zeros(l,1); +signal(1:N,1) = round(10 * rand(N,1)); +signal + +plot(abs(signal)); +xlim([1, l]); +title("Signal"); +pause() + +codiert = fft(signal) + +plot(abs(codiert)); +xlim([1, l]); +title("Codiert"); +pause() + +fehler = zeros(l,1); +fehler(21,1) = 2; +fehler(75,1) = 1; +fehler(7,1) = 2; + +plot(fehler); +xlim([1, l]); +title("Fehler"); +pause() + +empfangen = codiert + fehler; + +plot(abs(empfangen)); +xlim([1, l]); +title("Empfangen"); +pause() + +decodiert = ifft(empfangen) +plot(abs(decodiert)); +xlim([1, l]); +title("Decodiert"); +pause() + +syndrom = decodiert; +syndrom(1:N,1) = zeros(N,1) +plot(abs(syndrom)); +xlim([1, l]); +title("Syndrom"); +pause() + +locator = abs(fft(syndrom)) + +plot(locator); +xlim([1, l]); +title("Locator"); +pause() |