Why does matlab change cos / sin input?
1 view (last 30 days)
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
cos(2*x - 3)
How can i avoid this?
Siriniharika Katukam on 20 Feb 2020
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).