how to find z transform of a random sequence?

3 views (last 30 days)
hello, i wish to find out z transform expression of a huge sequence say 500 elements as it is required for some modelling in my project. if we have few elements, say [1 2 6 1 5], we can write the form as 1+2/z+6/z^2+1/z^3+5/z^4. But how to do this in case of large sequences, sure i don't want to manually write like the above one for all the elements. Please help!!!!!!
thanks in advance

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 23 Sep 2013
Edited: Azzi Abdelmalek on 23 Sep 2013
h=randi(10,1,500);
syms z zz
zz=1;
H=0;
for k=1:numel(h)
zz=zz*z^-1;
H=H+h(k)*zz;
end
%or maybe
h=randi(20,1,500); % Example
H=tf(0,1,1);
D=1;
for k=1:numel(h)
D=conv(D,[1 0]);
H=H+tf(h(k),D,1);
end

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!