Borrar filtros
Borrar filtros

How to collect coefficients of the same powers?

1 visualización (últimos 30 días)
mike cool
mike cool el 23 de En. de 2015
Respondida: Mohammad Abouali el 23 de En. de 2015
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!

Respuesta aceptada

Mohammad Abouali
Mohammad Abouali el 23 de En. de 2015
check if collect() works for you.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by