MATLAB Answers

How to solve an ODE in Simulink with non constant coefficients?

1 view (last 30 days)
Julia Navarro
Julia Navarro on 31 Jul 2021
Answered: Paul on 31 Jul 2021
Hi, I am new to Simulink and want to solve a second order, non-linear and non-homogeneous ODE with variable coefficients.
It is the following:
.
The main part I am struggling with is how to implement the independent variable t into the model. Is there a specific block for this?
Thanks in advance for any suggestions.

Answers (1)

Paul
Paul on 31 Jul 2021
Use a Clock block from the Sources library to output the simulation time (t).

Tags

Community Treasure Hunt

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

Start Hunting!