필터 지우기
필터 지우기

Help with solution of a horrible equation

조회 수: 1 (최근 30일)
For Queue
For Queue 2015년 3월 3일
편집: For Queue 2015년 3월 4일
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.

답변 (1개)

rantunes
rantunes 2015년 3월 3일
Hey,
Can you please show your implementation?
Thanks

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by