# Extract every subexpression in a symbolic expression between + and -

1 visualización (últimos 30 días)
Ahmed Hossam el 18 de Abr. de 2017
Comentada: Ahmed Hossam el 18 de Abr. de 2017
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:
(5*h*(a*(b/c)))/(...)
(5*h*(d*e*f)/(3*g))/(...)
(-5*h*(x*y)/(j*i*k))/(...)
...
?
Regards
Ahmed Hossam
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Andrew Newell el 18 de Abr. de 2017
Editada: Andrew Newell el 18 de Abr. de 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.
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Ahmed Hossam el 18 de Abr. de 2017
Nice!

Iniciar sesión para comentar.

### Categorías

Más información sobre Common Operations en Help Center y File Exchange.

### Community Treasure Hunt

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

Start Hunting!

Translated by