필터 지우기
필터 지우기

How to divide a polynomial into two polynomials, one with the odd coefficients of w and the other with the even coefficients of w?

조회 수: 1 (최근 30일)
I have the polynomial p(w) described below and I need to split it into two polynomials one with odd coefficients of w and the other with even coefficients of w, how can I do that?
P(w) = 25*ki - w^4*(kd + 1) + w*(25*kp - 1)*1i + w^3*(kp + 33/5)*1i + w^2*(ki - 25*kd + 41/5)
  댓글 수: 3
Alex Muniz
Alex Muniz 2022년 10월 24일
kp is a constant. The polynomial is a function of w.
I would like two polynomials as follows:
P(w) = 25*ki - w^4*(kd + 1) + w*(25*kp - 1)*1i + w^3*(kp + 33/5)*1i + w^2*( ki - 25*kd + 41/5)
P(w) = P_odd(w) + P_even(w)
P_odd(w) = w^3*(kp + 33/5)*1i + w*(25*kp - 1)*1i
P_even(w) = -w^4*(kd + 1) + w^2*( ki - 25*kd + 41/5) + 25*ki

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2022년 10월 24일
편집: Torsten 2022년 10월 24일
Odd part:
(P(w) - P(-w))/2
Even part:
(P(w) + P(-w))/2
syms w kd ki kp
P(w) = 25*ki - w^4*(kd + 1) + w*(25*kp - 1)*1i + w^3*(kp + 33/5)*1i + w^2*( ki - 25*kd + 41/5);
P_odd(w) = (P(w)-P(-w))/2
P_odd(w) = 
P_even(w) = (P(w) + P(-w))/2
P_even(w) = 
P_odd(w) + P_even(w) - P(w)
ans = 
0

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by