필터 지우기
필터 지우기

How to collect coefficients of the same powers?

조회 수: 1 (최근 30일)
mike cool
mike cool 2015년 1월 23일
답변: Mohammad Abouali 2015년 1월 23일
I am using the Symbolic Math Toolbox, and define polynoms as symbolic objects, eg:
syms a x y;
P = x^2*y + a*x*y^2 + x*y^2;
I would need to find a function that collects coefficients of the same powers, something like
collect_coeff(P,x*y^2)
that will return
a + 1
Would anyone have a solution to my problem? Thanks in advance!

채택된 답변

Mohammad Abouali
Mohammad Abouali 2015년 1월 23일
check if collect() works for you.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by