How to model Non linear differential equation in matlab

I want to model the following differential equation using simulink. d2x/dt2=g-C/m(i^2/x^2)* I have modeled it in simulink. but the problem is that at time =0 the reciprocal math function in the feed back loop gives NAN or INF error because at time =0 the output is zero. Kindly help me how can i remove the error or how can i model this differential equation. thanks.

 채택된 답변

Mischa Kim
Mischa Kim 2014년 2월 27일
편집: Mischa Kim 2014년 2월 27일

0 개 추천

Khan, simply set the initial condition for x to some value other than zero. You can change initial conditions by double-clicking the corresponding integrator block (Integrator1, in your case).

댓글 수: 1

Dear Mischa Kim, it really helped. Thanks for your answer.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

질문:

2014년 2월 27일

댓글:

2014년 2월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by