Extract every subexpression in a symbolic expression between + and -

1 view (last 30 days)
Is it somehow possible to get out of some expression E, for example:
E = 5*h*(a*(b/c)+(d*e*f)/(3*g)-(x*y)/(j*i*k)+...)/(...)
every subexpression, which is between + and -?
For Example:
Thank you for your help and support in advance.
Ahmed Hossam

Accepted Answer

Andrew Newell
Andrew Newell on 18 Apr 2017
Edited: Andrew Newell on 18 Apr 2017
Depends whether you have muPAD. In the Symbolic Toolbox, you can use
E = expand(E);
to separate the terms, but then you need these functions from muPAD: nops to find out how many terms there are and op to extract them.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!