Code covered by the BSD License  

Highlights from
Interactive Power Spectrum Demo, Version 2

image thumbnail
from Interactive Power Spectrum Demo, Version 2 by Tom O'Haver
Interactive signal generator with power spectrum display and sound output

SamplingtimeSlider(n,h)
function SamplingtimeSlider(n,h)
% Updates the value of samplingtime and re-draws the graph when the Time slider is moved
% Tom O'Haver, May 2007

global x
global y
global samplingtime
global samplerate
global f1
global f2
global signaltype
global signalstring
global soundmode

samplingtime=n;

RedrawSpectrum;
axes(h);
  h2=gca;

Contact us at files@mathworks.com