Error with ODE solver for Van der pol equation

조회 수: 3 (최근 30일)
Desislava Petkova
Desislava Petkova 2021년 12월 6일
댓글: Desislava Petkova 2021년 12월 6일
Hi All,
I am getting the below error when i try to code the VDP equation and then solve it with ode45. I am pretty new to Matlab, so it might be something obvious that just escapes my eyes. I tried searching for answers, but without success.
Equation is (δ^2 x)/(δt^2 )-μ*(1-x^2 ) *δx/δt+x=0 where time span is 0 to 25, m=1 and x(0)=0 and x'(0)=2.5
Any help/guideline will be appreciated.

채택된 답변

Walter Roberson
Walter Roberson 2021년 12월 6일
Your function receives Y but never uses it, and needs x but does not have a source for x.
The simplest fix would be to change the function header to use the variable x instead of Y
  댓글 수: 1
Desislava Petkova
Desislava Petkova 2021년 12월 6일
Changed it and it worked! Thank you for your help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by