Symbolic expansions, is it possible to express a solution as a series of exponentials
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
David H
am 9 Jun. 2014
Bearbeitet: Star Strider
am 11 Jun. 2014
Lets say I have something like
f_t = (A*cos(a*t) + B*sin(b*t))*(C*cos(c*t) + D*sin(c*t)),
what I would like is something of the form
f_t = c_1 exp(k1*t) + c_2 exp(k2*t) + ... + c_N exp(kN*t) .
I can't find anything within the symbolic toolbox that allows expansion in this form. I don't really want to write one either until I know for sure there isn't one included / on the FEX. Anyone that can help?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 9 Jun. 2014
To wit:
syms A a t
f_t = (A*cos(a*t) + B*sin(b*t))*(C*cos(c*t) + D*sin(c*t));
f_t = rewrite(f_t, 'exp')
produces:
f_t =
(A*(exp(-a*t*i)/2 + exp(a*t*i)/2) + B*((exp(-b*t*i)*i)/2 - (exp(b*t*i)*i)/2))*(C*(exp(-c*t*i)/2 + exp(c*t*i)/2) + D*((exp(-c*t*i)*i)/2 - (exp(c*t*i)*i)/2))
You’ll have to play with it it get the result in your example. There may not be any direct way to do that.
4 Kommentare
Star Strider
am 10 Jun. 2014
Bearbeitet: Star Strider
am 11 Jun. 2014
It would seem so.
I also experimented with subexpr, but wasn’t sure that’s what you wanted to do, so didn’t suggest it earlier. If the constants are related in some way, subs may also help. To break them out into fractional numerators and denominators, numden could help.
Explore the options in the Formula Rearrangement and Rewriting section of the documentation. I’m not certain you can do exactly what you want, but you can probably get close. Delving into MuPad directly may also provide options the Symbolic Math Toolbox does not, at least easily.
EDIT — I’ll take a look at it!
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!