Can I substitute a particular expression?
Show older comments
subexpr() discovers a common subexpression and rewrites a symbolic expression in terms of the found subexpression. How can I similarly rewrite an expression in terms a given subexpression? For example, I would like to use sigma = k^(1/2) to obtain:
sigma, sigma^3, sigma^5
out of
k^(1/2), k^(3/2), k^(5/2)?
3 Comments
Ajay Chauhan
on 23 Jul 2021
Hi Valeri,
I am trying to understand the use of subexpr(). It would be great if you could share a few examples/snippet so as to get an idea what needs to be substituted.
Valeri Aronov
on 23 Jul 2021
Valeri Aronov
on 24 Jul 2021
Edited: Valeri Aronov
on 24 Jul 2021
Accepted Answer
More Answers (0)
Categories
Find more on Numeric Solvers 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!


