extracting variables from syms

1 visualizzazione (ultimi 30 giorni)
Franco
Franco il 1 Dic 2011
lets say that I have the equation 2*x^2 + 3*y^2. I need to do 2 things. I need to extract the 2*x^2, and then I need to extract the coefficient 2. Anyone know how to do that?

Risposta accettata

Walter Roberson
Walter Roberson il 1 Dic 2011
See indets and coeff
Please note that both of those are part of the MuPAD Standard Library, available for calling within MuPAD itself, but there is no MATLAB interface to them. You will need to use feval(symengine,...) or evalin(symengine,...) to access them.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by