Signals and Systems : MATLAB Script Z Transform

Objective: to understand how to compute Z-transform using MATLAB built in function 'ZTRANS'
MATLAB code

clc;
close all;
clear all;
syms n
w=input('enter x(n)'wink;
y = ztrans(w);
z = pretty(y);
disp('The Z transform of x(n) is:'wink;
disp(z);

SAMPLE INPUT:
After running the above MATLAB script, you can enter the following sample inputs to see the output.

x(n)=(1/2)^n
x(n)=1/4^n
x(n)=(2*2^n+4*(1/2)^n)
Posted by makeale 01/05/2015 04:30 PM Comments
 

Archives