I believe the function children might have a problem. Acording to the documentation it returns a cell array containing the child subexpressions of each expression in A.
For example:
syms x ychildren(x^2 + x*y + y^2)
It will return:
[ x*y, x^2, y^2]
However, for the following:
children(x*y)
it return:
[ x, y]
I believe it should return:
x*y
Is it a bug ? Or am I missing something?
Best Answer