Professional Documents
Culture Documents
MatLab Programs
MatLab Programs
MatLab Programs
step sequence
n=0:5;
y=[ones(1,6)];
stem (n,y);
xlabel ('Time');
ylabel ('Amplitude');
title ('Step Waveform');
grid on
8. Inverse Z Transorm
clc;
close all;
clear all;
syms n;
syms k;
syms f(z);
f(z) = input('Please input a function to obtain its inverse z transform ');
disp(iztrans(f(z)));
12. Matlab program to find the linear convolution of two signals (using
matlab functions)
14. MATLAB program for Ideal Low Pass Linear Phase FIR Filter
clc;
close all;
clear all;
wc=input('Input the cut-off frequency in radians(less than pi)');
M=input('Input the length of ideal filter');
if wc>pi
error('cut-off frequency should be less than pi')
return
end
alpha=(M-1)/2;
n=0:1:(M-1);
m=n-alpha+eps;
hd=sin(wc*m)./(pi*m);
if nargout==0
stem(n,hd);
title('Impulse response of ideal low pass filter');
xlabel('n');
ylabel('hd(n)');
end