Symbolic collect and display
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ole
am 31 Aug. 2019
Kommentiert: Star Strider
am 31 Aug. 2019
I would lie to display the coefficients before the expansion terms of the cos one by one.
syms x y
f = expand(sin(x + 3*y));
coeffs_cosy = collect(f, cos(y))
How can the terms before the cos^n be displayed one by one?
This is short but for more complicated expressions, several dimensions the taylor series output text that cannot be displayed.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 31 Aug. 2019
I am not certain what result you want.
Try this:
[cfs,trm] = coeffs(coeffs_cosy, cos(y))
producing:
cfs =
[ 4*sin(x), 4*cos(x)*sin(y), -3*sin(x), -cos(x)*sin(y)]
trm =
[ cos(y)^3, cos(y)^2, cos(y), 1]
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!