MATLAB: Get only addends of subexpression children Suppose I have a symbolic expression like this syms x x0f=(x-x0)^3children(f)[(x-x0),3] I would like to get instead [(x-x0)^3] How can this be done? Best Answer You cannot do that with children().You need to do something like,feval(symengine, '(V) -> if testtype(V,"_plus") then [op(V)] else [V] end_if;', f) Related SolutionsMATLAB: Feval(symengine, ‘partfrac’ command error You forgot the * between 14 and x feval(symengine, 'partfrac', 4/ (((x - 7)^2 + 4^2 )* (x^2+14*x + 65))) MATLAB: How to use a Mupad function in Matlab workspace evalin(symengine, 'numlib::igcdmult(455,385,165,273)')feval(symengine, 'numlib::igcdmult', 455, 385, 165, 273) Related QuestionFind Child Subexpressions of Symbolic ExpressionSolving a function using symbolicIs there any way to separate the terms of a productIrreducibility test
Best Answer