2D wave visualiser
This script produces a mesh and colourmap to visualise the 2D wave equation in a confined control volume over a few hundred time intervals. It works by discretising the general 2D wave equation and iterating over the timesteps to calculate the accelerations, velocities, and positions of each element in each timestep. The script is sensitive to the choice of c1, c2 and dt, (inertia, stiffness, and timestep values) so it is not recommended to edit these constants as it may break the programme. The other constants and initial conditions are left to play with :)
This script was adapted from Kempf, Andreas M. (March 2007); Imperial College Department of Mechanical Engineering. Its most recent author wrote it for the AERO40003 Computing module of the Aeronautical Engineering course.
Cite As
Sevan Vlieghe (2025). 2D wave visualiser (https://www.mathworks.com/matlabcentral/fileexchange/84064-2d-wave-visualiser), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |