diff options
author | Divyansh Manocha <dan12n@users.noreply.github.com> | 2018-02-23 17:55:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-23 17:55:16 +0000 |
commit | 435de03e0a9a484f8474c420a0a30bb87fddd4d8 (patch) | |
tree | 6f847589201be8dfde9ba2d5e300d14923096896 /lab5/RTDSP/Matlab/elliptical.m | |
parent | da6b455dc35d1f9db153f1a7258549cd8e23f6b2 (diff) | |
download | NoiseSilencer-435de03e0a9a484f8474c420a0a30bb87fddd4d8.tar.gz NoiseSilencer-435de03e0a9a484f8474c420a0a30bb87fddd4d8.zip |
Updated code to a more generic version
Diffstat (limited to 'lab5/RTDSP/Matlab/elliptical.m')
-rw-r--r-- | lab5/RTDSP/Matlab/elliptical.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lab5/RTDSP/Matlab/elliptical.m b/lab5/RTDSP/Matlab/elliptical.m new file mode 100644 index 0000000..f9e2aeb --- /dev/null +++ b/lab5/RTDSP/Matlab/elliptical.m @@ -0,0 +1,10 @@ +function [b,a] = elliptical (Fs)
+
+order = 4; % Order of the bandpass filter
+startband = 270/Fs; % Normalised startband frequency
+stopband = 450/Fs; % Normalised stopband frequency
+ripple = 0.3; % The passband ripple (in dB)
+stopband_atten = 20; % The stopband attenuation (in dB)
+
+% Call the eliptical filter function
+[b,a] = ellip(order/2,ripple,stopband_atten,[startband, stopband]);
\ No newline at end of file |