how to solve equation in syms

1 Ansicht (letzte 30 Tage)
bencsl
bencsl am 7 Apr. 2019
Bearbeitet: bencsl am 7 Apr. 2019
i know the question is kinda stupid but very much appreciated if somebody could helps
syms x;
cos(10+x-x)
the ans keep showing "cos(10)" but i want it to be solved like -0.839071529076452

Akzeptierte Antwort

madhan ravi
madhan ravi am 7 Apr. 2019
syms x pi
cos(pi+x-x)
  3 Kommentare
madhan ravi
madhan ravi am 7 Apr. 2019
Bearbeitet: madhan ravi am 7 Apr. 2019
syms x pi
vpa(cos(10+x-x)) % will match the result in your edited question which was after the answer was given
double(cos(10+pi-pi)) % use double() to convert the result into decimal which of type double because syms result in the class of type sym
bencsl
bencsl am 7 Apr. 2019
Bearbeitet: bencsl am 7 Apr. 2019
thx a lot, it cost me 2 hours hahaaa

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

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!

Translated by