Matlab extract coefficient from z transform function
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Star Strider
2014 年 5 月 10 日
編集済み: Star Strider
2014 年 5 月 10 日
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 件のコメント
Star Strider
2014 年 5 月 10 日
My pleasure!
The sym3poly function would work with a ‘normal’ polynomial, but the symbolic terms in the denominator require numden and then circshift.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!