From 96c61feb021015cb3e5a2ae74ed7fd64236da8cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 13 Apr 2021 08:56:40 +0200 Subject: add experiment to reedsolomon --- buch/papers/reedsolomon/experiments/f.m | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 buch/papers/reedsolomon/experiments/f.m (limited to 'buch/papers') diff --git a/buch/papers/reedsolomon/experiments/f.m b/buch/papers/reedsolomon/experiments/f.m new file mode 100644 index 0000000..ba58825 --- /dev/null +++ b/buch/papers/reedsolomon/experiments/f.m @@ -0,0 +1,56 @@ +# +# 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 + +codiert = fft(signal) + +plot(abs(signal)); +xlim([1, l]); +title("Signal"); +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() -- cgit v1.2.1 From 516b6c8a4d7672a13847d1fb71be2df213459d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 13 Apr 2021 09:47:35 +0200 Subject: update fs-fft --- buch/papers/reedsolomon/experiments/f.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'buch/papers') diff --git a/buch/papers/reedsolomon/experiments/f.m b/buch/papers/reedsolomon/experiments/f.m index ba58825..6bdc741 100644 --- a/buch/papers/reedsolomon/experiments/f.m +++ b/buch/papers/reedsolomon/experiments/f.m @@ -11,13 +11,18 @@ signal = zeros(l,1); signal(1:N,1) = round(10 * rand(N,1)); signal -codiert = fft(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; -- cgit v1.2.1