Why does matlab change cos / sin input?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Wouter van den Wijngaard
am 17 Feb. 2020
Beantwortet: Siriniharika Katukam
am 20 Feb. 2020
Hello,
Something very weird happens when i try to integrate cos / sin functions. Matlab changes te values i put in the cos / sin for example this happens when i want to integrate acceleration (a) to speed (v):
>> syms x
>> a=cos(-2*x+3)
a =
cos(2*x - 3)
How can i avoid this?
2 Kommentare
Stephen23
am 17 Feb. 2020
"Something very weird happens when i try to integrate cos / sin functions..."
Why is it weird? They are exactly equivalent.
Antworten (1)
Siriniharika Katukam
am 20 Feb. 2020
Hi
Assuming that your issue is the change of signs in the "cos" function, the interpreted value of a as cos(2*x - 3) is right as "cos(x) = cox(-x)". You will get the same values when you try to integrate both cos(-2*x + 3) and cos(2*x – 3).
0 Kommentare
Siehe auch
Kategorien
Mehr zu Graphics Performance finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!