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 件のコメント

Khan 954
Khan 954 2014 年 2 月 27 日
Dear Mischa Kim, it really helped. Thanks for your answer.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGeneral 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