How to create a Matlab object that simulates a spring-mass system without Simulink
Mostrar comentarios más antiguos
I am trying to model a dynamic system (e.g., a spring-mass system) withing a big project, that may be deployed on a machine that doesn't have Simulink.
I would like to create a spring-mass system object, which has a method that takes time as input and return the position, and that stores all the history of states, to be used for the numerical integration.
How can I do it, without SImulink?
Note: I am aware of ODE solvers (e.g., ode45), but my problem with these solvers is that they solve for the all time steps at once, which contrary to what I need. I need to solve for only one time step, as needed.
Thanks :)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Configure Simulation Conditions en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




