Matlab Programs for DSP | Scigyan
Showing posts with label Matlab Programs for DSP. Show all posts
Showing posts with label Matlab Programs for DSP. Show all posts

Design filter by Rectangular window function

Matlab program to design filter by Rectangular window function.

Matlab code

clc; close all; clear all
Wc=.5*pi;
taps=25; % No of taps 
N=taps-1; % Filter order 

Analog-to-Digital filter conversion

Matlab program for Analog-to-Digital filter conversion. This program convert Analog Domain signal to Digital domain. 

Matlab code

% Let Transfer function in Analog Domain is (s^2+2s+1)/(s^3+5s^2+11s+15)
clc; close all; clear all; b=[1,2,1];
a=[1,5,11,15];
fs=5; %Sampling frequency

Chebyshev Type 2 Digital Band Stop Filter

Matlab program to design Chebyshev Type 2 Digital Band Stop Filter.

Matlab code

clc; clear all; close all;
rp=input('Enter the Passband ripple (In db) = '); 
rs=input('Enter the Stopband attenuation (In db) = '); 

Chebyshev Type 2 Digital Band Pass Filter

Matlab program to design Chebyshev Type 2 Digital Band Pass Filter.

Matlab code

clc; clear all; close all;
rp=input('Enter the Passband ripple (In db) = '); 
rs=input('Enter the Stopband attenuation (In db) = ');