summaryrefslogtreecommitdiff
path: root/52/CH2/EX2.1/Example2_1.sce
blob: bd90f996e912e75e2b7d6372208b7825dc556a51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Example 2.1
//Z- transform of [1 0 3 -1 2] 
clear;
clc ;
close ;
function[za]=ztransfer(sequence,n)
z=poly(0,'z','r')
za=sequence*(1/z)^n'
endfunction
x1=[1 0 3 -1 2];
n=0:length(x1)-1;
zz=ztransfer(x1,n);    
//Display the result in command window
disp (zz,"Z-transform of sequence is:");
disp('ROC is the entire plane except z = 0');