%% L03_ztransform %% ============== %% Function to find z-transform using symbolic toolbox (maple). %% %% Created : 15 July 2005 %% Modified : 15 July 2005 %% %% Copyright (c) 2005 Salman Durrani . %% ------------------------------------------------------------ %% clear matlab memory clear all; clc syms f w c n z %% Take z transform %% Unit step u[n] f = heaviside(n); Ans1=maple('ztrans',f,n,z) %% Discrete Exponential c^n u[n] %% Folowing two expressions give the same answer f = (c^n); Ans2=maple('ztrans',f,n,z) f= (c^n)*heaviside(n); Ans3=maple('ztrans',f,n,z) %% Discrete Sine wave f= sin(w*n); Ans4=maple('ztrans',f,n,z) pretty(Ans4)