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.6/Example2_06.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.6/Example2_06.sce')
-rw-r--r-- | 737/CH2/EX2.6/Example2_06.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/737/CH2/EX2.6/Example2_06.sce b/737/CH2/EX2.6/Example2_06.sce new file mode 100644 index 000000000..5c0298d92 --- /dev/null +++ b/737/CH2/EX2.6/Example2_06.sce @@ -0,0 +1,18 @@ +//Example 2.6 page 29 +//Given the DSP system shown in Figure 2.16, where a sampling rate of +//40,000 Hz is used, the anti-aliasing filter is a Butterworth lowpass filter +//with a cutoff frequency of 8 kHz, and the percentage of aliasing level at the +//cutoff frequency is required to be less than 1%, determine the order of +//the anti-aliasing lowpass filter. + +clc,clear,close; +fs=40000,fc = 8000,fa=8000;//Hz +aliasing_noise = 100; +n = 0; +while(aliasing_noise > 1) + n = n+1; + aliasing_noise = (1+(fa/fc)^(2*n))^(.5) / (1+((fs-fa)/fc)^(2*n))^(.5) * 100; + disp("n = "+string(n)+", Aliasing Noise Level = "+string(aliasing_noise)+"%" ) +end + +disp("To satisfy 1% aliasing noise level, we choose n = " +string(n));
\ No newline at end of file |