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

SignalSlider(n,h)
function SignalSlider(n,h)
% Updates the value of signaltype and re-draws the graph when the Signal 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

signaltype=round(n);

RedrawSpectrum;
axes(h);
  h2=gca;

Contact us at files@mathworks.com