Bouncing Rod Simulator -- ODE45 Event Detection Example

Simulate a rod bouncing and tumbling with animation.
230 téléchargements
Mise à jour 25 juin 2016

Note de l’éditeur : This file was selected as MATLAB Central Pick of the Week

Video here: https://www.youtube.com/watch?v=G5IpQ53SY6A&feature=youtu.be
This is an example of how event detection works in MATLAB with integrator ODE45. A simple rod bounces and tumbles on flat ground until it finally begins sliding. This might be helpful to you if you have continuous dynamics with discrete events happening (like collisions).
Files:
1. MAIN_simulate.m -- Run this first!
2. deriveCollisions.m -- Derives contact map equations to determine how the rod acts after a collision. This file auto-generates:
* DiscreteCollisionsPt1.m
* DiscreteCollisionsPt2.m
3. slidingPhase.m -- Equations of motion for the sliding rod.
4. flightPhase.m -- Equations of motion for the flying rod.
5. contact.m -- Conditions passed to ODE45 so it can determine when events occur and what to do.
6. animate.m -- Draw the scene and show what happened during the simulation.

Citation pour cette source

Matthew Sheen (2024). Bouncing Rod Simulator -- ODE45 Event Detection Example (https://github.com/mws262/MATLABBouncingRod), GitHub. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2014b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

Les versions qui utilisent la branche GitHub par défaut ne peuvent pas être téléchargées

Version Publié le Notes de version
1.0.0.0

better picture

Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.
Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.