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!