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

조회 수: 1(최근 30일)
Ahmed Hossam 2017년 4월 18일
댓글: Ahmed Hossam 2017년 4월 18일
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

댓글을 달려면 로그인하십시오.

### 채택된 답변

Andrew Newell 2017년 4월 18일
편집: Andrew Newell 2017년 4월 18일
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표시숨기기 없음
Ahmed Hossam 2017년 4월 18일
Nice!

댓글을 달려면 로그인하십시오.

### 범주

Find more on Common Operations in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by