Source code 1
clc;
clear all;
close all;
syms n;
x = n+1;
X = ztrans(x);
disp(X);
pretty(X);
Source code 2
clc;
clear all;
close all;
x= input('enter the sequence');
X=0;
n=length(x);
y=sym('z');
for i= 1:n
X= X+ x(i)*y^(1-i);
end
display(X);
%Inverse Z Transform
%Source code3
clc;
close all;
clear all;
syms z;
X = z/(z - 1) + z/(z - 1)^2;
x = iztrans(X);
disp(x);
Finding poles and zeros for the function
clc;
close all;
clear all;
b=[0 1 1 ]
//( numerator values)
a= [1 -2 3] //(denominator values)
roots(a)
roots(b)
zplane(b,a);