Home


I am greatly obliged to:


YOU
&



To view the program code of a MATLAB program, please click on its name, from the list below.

  1. MATLAB program for trapezoidal waveform
  2. MATLABprogram for Z-Transform of finite duration sequence.
  3. MATLAB program to plot zeros and poles of z-transform
  4. MATLAB Program for Rayliegh Distribution
  5. MATLAB Program for Uniform Distribution
  6. MATLABProgram for Random Sequence Generation
  7. MATLABprogram for normal distribution
  8. MATLAB program for sampling rate conversion
  9. MATLAB program for equiripple FIR filter
  10. MATLAB program for Ideal LowPass Linear Phase FIR Filter
  11. MATLAB program for Unfolding and Unwrapping of DFT
  12. MATLAB program to find DFT and IDFT using matlab functions 
  13. MATLAB program to find IDFT without using MATLAB function
  14. MATLAB program to find DFT without function
  15.  MATLAB program for PWM signal generation
  16. MATLAB program for FM signal generation
  17. MATLAB program for AM signal generation
  18. MATLAB program for exponential waveform generation
  19. MATLAB program for impulse waveform generation
  20. MATLAB program for sawtooth waveform generation
  21. MATLAB program for square wave generation
  22. MATLAB program for Ramp Waveform generation
  23. MATLAB program for step waveform generation
  24. MATLAB Program to generate a cosine waveform
  25. Matlab program to create a sinusoidal waveform
  26. MATLAB Program to find the Fourier Transform of sinusiodal waveform
  27. MATLAB program to perform the linear convolution of two signals (without using MATLAB function)
  28. MATLAB program to perform linear convolution of two signals  ( using MATLAB functions)
  29. MATLAB program to generate logarithmic curve
  30. MATLAB program to perform the circular convolution of two signals
  31. MATLAB program to find the Fourier Transform of cosine wave
  32. MATLAB program to find the Fourier Transform of an exponential curve
  33. MATLAB program for the design and implementation of Butterworth low pass filter
  34. MATLAB program for the design and implementation of Butterworth high pass filter
  35. My first post   (about life)

The author and programmer of this blog : Anju K
Our address : 
'Sreyas', House no.7/296,
Pulliodi, Kathiroor village,
P.O. Ponniyam east,
via Ponniyam west,
Thalassery,
Kannur district,
Kerala - 670641.
India.


I have no other undertakings or firms except  https://s5electronicsandcommunication.blogspot.com and https://programmesc.blogspot.com .

Number of people from each nation, who have already read this weblog

.......and many more people from many other nations 

MATLAB program for the design and implementation of Chebyshev low pass filter


Program code
%Chebyshev low pass filter
clc;
clear all;
close all;
fp=input('Please enter the pass band frequency: ');
fs=input('Please enter the stop band frequency: ');
rp=input('Please enter the pass band attenuation: ');
rs=input('Please enter the stop band attenuation: ');
sf=input('Please enter the sampling frequency: ');
wp=2*fp/sf;
ws=2*fs/sf;
[n,wn]=cheb1ord(wp,ws,rp,rs);
[b,a]=cheby1(n,rp,wn,'low');
freqz(b,a);
title('Chebyshev low pass filter');

Example of output

Please enter the pass band frequency: 2000
Please enter the stop band frequency: 1600
Please enter the pass band attenuation: .4
Please enter the stop band attenuation: 50
Please enter the sampling frequency: 8000 


















_________________________________________

MATLAB program for the design and implementation of Chebyshev high pass filter


Program code
%Chebyshev high pass filter
clc;
clear all;
close all;
fp=input('Please enter the pass band frequency: ');
fs=input('Please enter the stop band frequency: ');
rp=input('Please enter the pass band attenuation: ');
rs=input('Please enter the stop band attenuation: ');
sf=input('Please enter the sampling frequency: ');
wp=2*fp/sf;
ws=2*fs/sf;
[n,wn]=cheb1ord(wp,ws,rp,rs);
[b,a]=cheby1(n,rp,wn,'high');
freqz(b,a);
title('Chebyshev high pass filter');

Example of output

Please enter the pass band frequency: 2000
Please enter the stop band frequency: 1600
Please enter the pass band attenuation: 0.3
Please enter the stop band attenuation: 40
Please enter the sampling frequency: 8000


















__________________________


MATLAB program for the design and implementation of Chebyshev band pass filter


Program code
%Chebyshev band pass filter
clc;
clear all;
close all;
fp1=input ('Please input the first pass band frequency = ');
fs1=input ('Please input the first stop band frequency = ');
fp2=input ('Please input the second pass band frequency = ');
fs2=input ('Please input the second stop band frequency = ');
rp=input ('Please input the pass band attenuation = ');
rs=input ('Please input the stop band attenuation = ');
sf=input ('Please input the sampling frequency = ');
p1=2*fp1/sf;
s1=2*fs1/sf;
p2=2*fp2/sf;
s2=2*fs2/sf;
p=[p1,p2];
s=[s1,s2];
[n,w]=cheb1ord(p,s,rp,rs);
[f1,f2]=cheby1(n,rp,w,'bandpass');
freqz(f1,f2);
title ('Chebyshev Band Pass Filter');

Example of output
Please input the first pass band frequency = 2000
Please input the first stop band frequency = 1600
Please input the second pass band frequency = 3000
Please input the second stop band frequency = 3200
Please input the pass band attenuation = 0.5
Please input the stop band attenuation = 50
Please input the sampling frequency = 9000


















_______________________

MATLAB program for the design and implementation of Butterworth band pass filter

Program code

clc;
clear all;
close all;
fp1=input ('Please input the first pass band frequency = ');
fs1=input ('Please input the first stop band frequency = ');
fp2=input ('Please input the second pass band frequency = ');
fs2=input ('Please input the second stop band frequency = ');
rp=input ('Please input the pass band attenuation = ');
rs=input ('Please input the stop band attenuation = ');
sf=input ('Please input the sampling frequency = ');
p1=2*fp1/sf;
s1=2*fs1/sf;
p2=2*fp2/sf;
s2=2*fs2/sf;
p=[p1,p2];
s=[s1,s2];
[n,w]=buttord(p,s,rp,rs);
[f1,f2]=butter (n,w,'bandpass');
freqz(f1,f2);
title ('Butterworth Band Pass Filter');


Example of output
Please input the first pass band frequency = 2000
Please input the first stop band frequency = 1700
Please input the second pass band frequency = 3000
Please input the second stop band frequency = 3200
Please input the pass band attenuation = 0.5
Please input the stop band attenuation = 60
Please input the sampling frequency = 9000













_____________________________

MATLAB program to perform linear convolution using circular convolution

Program code

%linear convolution using circular convolution
clc;
clear all;
close all;
x=input('Please enter the first sequence x[n] = ');
h=input('Please enter the second sequence h[n] = ');
len_x=length(x);
len_h=length(h);
h=[h zeros(1,len_x-1)];
x=[x zeros(1,len_h-1)];
L=len_x+len_h-1;
for i=0:L-1
    for j=1:L-i;
        a(j+i,i+1)=x(j);
    end
end
for m=1:L-1
    for n=m+1:L
        a(m,n)=x(L-n+m+1);
    end
end
b=transpose(h);
y=a*b;
y=transpose(y);
subplot(311);
stem(x);
disp('The sequence obtained after linear convolution of x[n] with h[n], is given below. ');
disp(y);
grid on;
title('First sequence x[n] ');
subplot(312);
stem(h);
grid on;
title('Second sequence h[n] ');
subplot(313);
stem(y);


Example of output

Please enter the first sequence x[n] = [1 2 3 4 5 6]
Please enter the second sequence h[n] = [1 2 3 4 5 6]
The sequence obtained after linear convolution of x[n] with h[n], is given below.
     1     4    10    20    35    56    70    76    73    60    36

________________________________________

MATLAB program for the design and implementation of Butterworth high pass filter

Program code
clc;
clear all;
close all;
fp=input('Please enter the first pass band frequency: ');
fs=input('Please enter the first stop band frequency: ');
rp=input('Please enter the pass band attenuation: ');
rs=input('Please enter the stop band attenuation: ');
sf=input('Please enter the sampling frequency: ');
wp=2*fp/sf;
ws=2*fs/sf;
[n,wn]=buttord(wp,ws,rp,rs);
[b,a]=butter(n,wn,'high');
freqz(b,a);
title('Butterworth High Pass Filter');

Example of output
Please enter the first pass band frequency: 2000
Please enter the first stop band frequency: 1300
Please enter the first pass band attenuation: 0.35
Please enter the first stop band attenuation: 50
Please enter the sampling frequency: 8000


_____________________________

For sale

For sale
Indian currency Ten-rupee note in good condition. Issued by the Reserve Bank of India between 22 December 1992 and 21 December 1997. Serial number 52T332603 . Those interested to buy, please contact: Anju K, Email: tc9749@gmail.com . Address: 'Sreyas', House no.7/296, Pulliodi, Kathiroor village, Ponniam east PO, via Ponniam west, Thalassery, Kannur, Kerala - 670641, India.