Clear Filters
Clear Filters

How to separate symbolic equation coefficients

13 views (last 30 days)
Gil maor
Gil maor on 23 May 2017
Commented: Gil maor on 23 May 2017
Hi All,
Lets say that I have a symbolic term L=Ax+By not in vector form. How do I, get the term that multiplies x and y i.e. Q=A,W=B without retyping the equation?
Thanks!
Gil,

Answers (1)

Andrei Bobrov
Andrei Bobrov on 23 May 2017
Edited: Andrei Bobrov on 23 May 2017
syms A B x y
L = A*x + B*y;
out = coeffs(L,[x,y])

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!