diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /737/CH2/EX2.4/Example2_04.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '737/CH2/EX2.4/Example2_04.sce')
-rw-r--r-- | 737/CH2/EX2.4/Example2_04.sce | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/737/CH2/EX2.4/Example2_04.sce b/737/CH2/EX2.4/Example2_04.sce new file mode 100644 index 000000000..cbf4ee3a1 --- /dev/null +++ b/737/CH2/EX2.4/Example2_04.sce @@ -0,0 +1,19 @@ +//Example 2.4 page 27
+//Given the DSP system shown in Figures 2.16 to 2.18, where a sampling rate of 8,000 Hz is used and the anti-aliasing filter is a second-order Butterworth lowpass filter with a cutoff frequency of 3.4 kHz,
+//a. Determine the percentage of aliasing level at the cutoff frequency.
+//b. Determine the percentage of aliasing level at the frequency of 1,000 Hz.
+
+clc,clear,close;
+fs=8000,fc = 3400;//Hz
+n =2;
+
+//part a
+fa = 3400;//Hz, aliasing frequency
+aliasing_noise = (1+(fa/fc)^(2*n))^(.5) / (1+((fs-fa)/fc)^(2*n))^(.5) * 100;
+disp("(a) Aliasing Noise Level = "+string(aliasing_noise)+"%" )
+
+//part b
+fa = 1000;//Hz, aliasing frequency
+aliasing_noise = (1+(fa/fc)^(2*n))^(.5) / (1+((fa-fs)/fc)^(2*n))^(.5) * 100;
+disp("(b) Aliasing Noise Level = "+string(aliasing_noise)+"%" )
+
|