Ex 5 Deterrmine The Z-Transform and Its ROC
Ex 5 Deterrmine The Z-Transform and Its ROC
APPARATUS REQUIRED:
PC with MATLAB software
ALGORITHM:
1. Specify the input variable and its values
2. Give the formula for determining the z-transform
3. Display the value of z-transform for its assigned variable
4. Give the formula for determining the inverse z-transform and call the assigned
variable for z-transform
5. Display the value of inverse z-transform
PROCEDURE:
1. Enter the program in workspace.
2. Save and Run it in .m files.
3. Observe the output in figure window.
PROBLEM STATEMENT:
Determine the following
i) z-transform of 2^n and verify with output with inverse z-transform
ii) z-transform of 0.5^n and verify the output with inverse z-transform
PROGRAM:
%determine the Z-transform%
clc ;
close all;
syms n;
disp('a=2')
a=2;
x=a^n;
X=ztrans(x); %finding z transform
disp('z tranform of a^n a>1');
disp(X);
syms n;
a=0.5;
x=a^n;
X1=ztrans(x);
disp('z tranform of a^n 0<a<1');
disp(X1);
syms n;
a=2;
x=1+n;
X2=ztrans(x);
disp('z tranform of 1+n');
disp(X2);
A=iztrans(X);
disp('inverse z tranform of z(a^n) a>1');
disp(A);
B=iztrans(X1);
disp('inverse z tranform of a^n 0<a<1');
disp(B);
C=iztrans(X2);
disp('inverse z tranform of 1+n');
disp(C);
subplot(1,3,1);
zplane([1 0],[1 -2]);
subplot(1,3,2);
zplane([1 0],[1 -1/2]);
subplot(1,3,3);
zplane([1 0 0],[1 -2 1]);
OUTPUT:
a=2
z tranform of a^n a>1
z/(z - 2)
z tranform of 1+n
z/(z - 1) + z/(z - 1)^2