Matlab extract coefficient from z transform function
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
David
am 10 Mai 2014
Kommentiert: Star Strider
am 10 Mai 2014
Hi I have a z transform function 3/z + 5/z^2 + 6/z^3 + 1
How would I extract the coefficients from this equation? I have tried using coeffs and it says it is not a polynomial.
I would like the answer to come out as [3 5 6 1]
The symbolic z variable is declared as syms z
0 Kommentare
Akzeptierte Antwort
Star Strider
am 10 Mai 2014
Bearbeitet: Star Strider
am 10 Mai 2014
syms z
fz = 3/z + 5/z^2 + 6/z^3 + 1
[fzn, fzd] = numden(fz)
fzc = sym2poly(fzn)
fzc = circshift(fzc, [0 -1])
produces:
fzc =
3 5 6 1
2 Kommentare
Star Strider
am 10 Mai 2014
My pleasure!
The sym3poly function would work with a ‘normal’ polynomial, but the symbolic terms in the denominator require numden and then circshift.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!