diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-01-29 13:08:05 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-01-29 13:08:05 +0000 |
commit | d04662418a3f747a965710ebf812e7aec96bae5b (patch) | |
tree | 426deb323f0ecda53d391884d192c4882eb4626b /lab2 | |
parent | 8ae00d0644561e4211e0531b29ffff876c092f25 (diff) | |
download | NoiseSilencer-d04662418a3f747a965710ebf812e7aec96bae5b.tar.gz NoiseSilencer-d04662418a3f747a965710ebf812e7aec96bae5b.zip |
[lab2] Adding screenshots
Diffstat (limited to 'lab2')
-rw-r--r-- | lab2/resources/3900khz.jpg | bin | 0 -> 125275 bytes | |||
-rw-r--r-- | lab2/resources/deformed_real.jpg | bin | 0 -> 185522 bytes | |||
-rw-r--r-- | lab2/resources/deformed_simulated.jpg | bin | 0 -> 28092 bytes | |||
-rw-r--r-- | lab2/resources/sinewave_graph.PNG (renamed from lab2/RTDSP/Resources/sinewave_graph.PNG) | bin | 17702 -> 17702 bytes | |||
-rw-r--r-- | lab2/scripts/filter.py (renamed from lab2/filter.py) | 0 | ||||
-rw-r--r-- | lab2/scripts/gensin.m | 23 | ||||
-rw-r--r-- | lab2/scripts/requirements.txt (renamed from lab2/requirements.txt) | 0 | ||||
-rw-r--r-- | lab2/scripts/test_nyquist.m | 4 | ||||
-rw-r--r-- | lab2/scripts/test_nyquist.m~ | 4 |
9 files changed, 31 insertions, 0 deletions
diff --git a/lab2/resources/3900khz.jpg b/lab2/resources/3900khz.jpg Binary files differnew file mode 100644 index 0000000..8450e8d --- /dev/null +++ b/lab2/resources/3900khz.jpg diff --git a/lab2/resources/deformed_real.jpg b/lab2/resources/deformed_real.jpg Binary files differnew file mode 100644 index 0000000..57e716b --- /dev/null +++ b/lab2/resources/deformed_real.jpg diff --git a/lab2/resources/deformed_simulated.jpg b/lab2/resources/deformed_simulated.jpg Binary files differnew file mode 100644 index 0000000..1457bac --- /dev/null +++ b/lab2/resources/deformed_simulated.jpg diff --git a/lab2/RTDSP/Resources/sinewave_graph.PNG b/lab2/resources/sinewave_graph.PNG Binary files differindex 9109339..9109339 100644 --- a/lab2/RTDSP/Resources/sinewave_graph.PNG +++ b/lab2/resources/sinewave_graph.PNG diff --git a/lab2/filter.py b/lab2/scripts/filter.py index c35f75e..c35f75e 100644 --- a/lab2/filter.py +++ b/lab2/scripts/filter.py diff --git a/lab2/scripts/gensin.m b/lab2/scripts/gensin.m new file mode 100644 index 0000000..ae8b6d7 --- /dev/null +++ b/lab2/scripts/gensin.m @@ -0,0 +1,23 @@ +% Generates a discrete sine wave with the following properties + +% A: Amplitude +% F0: frequency +% fs: sampling frequency +% theta: initial phase +% nstart: first sample index +% nend: last sample index +function x = gensin(A, F0, fs, theta, nstart, nend) + +% zero the column vector to the right size +fullSeries = zeros(nend-nstart+1, 1); + +% go through all the elements until the end +for i = 1:nend + % apply the sine wave for every element + fullSeries(i) = A*sin(2*pi*F0*i/fs + theta); +end + +% set the result to the window that was passed in by the user +x = fullSeries(nstart:nend); + +end
\ No newline at end of file diff --git a/lab2/requirements.txt b/lab2/scripts/requirements.txt index 6d456f7..6d456f7 100644 --- a/lab2/requirements.txt +++ b/lab2/scripts/requirements.txt diff --git a/lab2/scripts/test_nyquist.m b/lab2/scripts/test_nyquist.m new file mode 100644 index 0000000..30d63c5 --- /dev/null +++ b/lab2/scripts/test_nyquist.m @@ -0,0 +1,4 @@ +wave39 = gensin(1, 3900, 96000, 0, 1, 400); +wave41 = gensin(0.1, 4100, 96000, 0, 1, 400); + +plot(wave39+wave41)
\ No newline at end of file diff --git a/lab2/scripts/test_nyquist.m~ b/lab2/scripts/test_nyquist.m~ new file mode 100644 index 0000000..1d4c541 --- /dev/null +++ b/lab2/scripts/test_nyquist.m~ @@ -0,0 +1,4 @@ +wave39 = gensin(1, 3900, 96000, 0, 1, 100); +wave41 = + +plot(wave)
\ No newline at end of file |