Effacer les filtres
Effacer les filtres

Help with solution of a horrible equation

1 vue (au cours des 30 derniers jours)
For Queue
For Queue le 3 Mar 2015
Modifié(e) : For Queue le 4 Mar 2015
A mechanical engineering problem ends up requiring the solution of the following horrible equation for y as a function of t:
(dy/dt)*(A * cos(t-B*cos(y)) * B * sin(y) - C * cos(y)) + (A * cos(t-B*cos(y)) - cot(y)) = 0
A, B and C are constants (A=1.9, B=0.3, C=1.5). The range of solution is 0.5*pi-->2.5*pi. The initial condition is y(pi/2)=pi/2.
I tried to set this up with ode45 (it ran forever) and ode15i and failed miserably. For ode15i, I tried: [t, y] = ode15i(@odefun, [0.5*pi 2.5*pi], pi/2, 0)
function res = odefun(t, y, yprime) res = yprime *(A * cos(t-B*cos(y)) * B * sin(y) - C * cos(y)) + (A * cos(t-B*cos(y)) - cot(y)); end
Any suggestion on how to set up this equation for solution would be appreciated.

Réponses (1)

rantunes
rantunes le 3 Mar 2015
Hey,
Can you please show your implementation?
Thanks

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by