expr2=collect(EXPR,'exp(-t)') Why is it wrong?
2 views (last 30 days)
Show older comments
EXPR=str2sym('(x^2+x*exp(-t)+1)*(x+exp(-t))')
expr1=collect(EXPR)
expr2=collect(EXPR,'exp(-t)')
Why expr2 shows: sym.charToFunction (line 26) Invalid variable name
0 Comments
Accepted Answer
madhan ravi
on 22 Apr 2019
Edited: madhan ravi
on 22 Apr 2019
expr2=collect(EXPR,exp(-t)) % no single quotes around the second argument
0 Comments
More Answers (0)
See Also
Categories
Find more on Assumptions 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!