Draw travelling waves and standing waves from their equations, add two waves to see beats and interference, build a complex sound from harmonics, and fit a sine curve to noisy measurements.
3 lessons, about 1 h 40 min3 simulations10 problems4 practice questionsPython in every lesson
A travelling wave is . In numpy, is an array of positions, so one line gives the wave at one time. Here and , and the speed is . Plotting at several times shows a crest moving.
Waves add point by point: . Two close frequencies give beats at . Two equal waves running opposite ways give a standing wave with nodes half a wavelength apart. Odd harmonics build a square wave.
Real readings are noisy. The FFT in numpy shows which frequencies a signal holds and gives a first guess. Then scipy's curve_fit finds the amplitude, frequency and phase of the best sine, with an error for each. Read too slowly and a fast wave looks slow.
Log in to join the discussion.
Loading…