Problem with using subs() for products of symbolic variables

2 ビュー (過去 30 日間)
James 2012 年 1 月 6 日
I have a question regarding the use of the subs function in the symbolic toolbox. It seems to have trouble with products of symbolic variables. For example, I would expect
>> subs(3*a*b+b,a*b,0) to produce b
Instead, it produces: b + 3*a*b
Can this be remedied?


Andrei Bobrov
Andrei Bobrov 2012 年 1 月 6 日
use function subsex by MuPAD
out = feval(symengine,'subsex', b + 3*a*b, 'a*b = 0')
  1 件のコメント
James 2012 年 1 月 6 日
Thanks! That works just fine.


その他の回答 (1 件)

Felipe G. Nievinski
Felipe G. Nievinski 2013 年 5 月 7 日


Community Treasure Hunt

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

Start Hunting!

Translated by