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.

 Respuesta aceptada

Mischa Kim
Mischa Kim el 27 de Feb. de 2014
Editada: Mischa Kim el 27 de Feb. de 2014
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 comentario

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre General Applications en Centro de ayuda y File Exchange.

Preguntada:

el 27 de Feb. de 2014

Comentada:

el 27 de Feb. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by