File Exchange

image thumbnail

vibrating string simulator

version (75.7 KB) by Maxim Vedenyov
Possible to set inital position, velocity, friction.


Updated 20 Mar 2012

View License
Simulator of vibrating string with possibility to set different parameters include initial positions, velocities, distributed friction. Solved as 1d wave equation with friction with FDM method. It is possible to plot graph, spectrogram, animated graph, listen stereo sound and realtime. Move markers with mouse.

Run vibrating_string_simulator.m

Option realtime video and audio possible if daq toolbox instlled. Option spectrogram is possible if signal processing toolbox installed.

Cite As

Maxim Vedenyov (2021). vibrating string simulator (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

Amaya Lopez-Carromero

Excellent simulator. Thanks so much for this, I am using it in a Musical acoustics course at University to explain the differences between sharp and soft plucking as well as the relationship between position of plucking and mode content in the resulting note.
I found a couple of things that need updated:

in save_to_wav.m, lines 50 and 59 need updating to audiowrite, observing the differences in parameter input from the old wavwrite.



Dan Ramnytz

Filip Niemczyk

Marco Ayala

Serkan Guler

Evan Provan

jing zhang

Phill Johanson

Well done dude, worked for me


Maxim Vedenyov

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Interactive curve class

Community Treasure Hunt

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

Start Hunting!