/massSpringDiffEQ

A code that animates the various solutions to a mass-spring system governed by mx'' + bx' + kx = F(t).

Primary LanguageMATLAB

Mass Spring System Demonstration for Differential Equations Class

Author: Dr. David Montgomery, Department of Applied Mathematics, Colorado School of Mines

This code animates solutions to mx'' + bx' + kx = F(t), with x(0) = P0, x'(0) = V0. m is mass, b is the damping constant, k is the spring constant. The forcing function has amplitude F0 and forcing frequency gamma.

Choose from the folowing examples:

example = 'Freestyle' to edit parameters freely

example = 'Undamped' for undamped free vibrations

example = 'Underdamped' for underdamped free vibrations

example = 'Overdamped' for overdamped free vibrations

example = 'Critical' for critically damped free vibrations

example = 'Forced' for underdamped forced vibrations

example = 'Beats' for undamped forced vibrations w/beats phenomenom

example = 'Resonance' for undamped forced vibrations w/resonance

If you want to save a video of the animation set saveVideo = 'true'

Videos of Animations

Sample Images from Animations