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

SampleRateSlider(n,h)
function SampleRateSlider(n,h)
% Updates the value of samplerate and re-draws the graph when the Rate 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
samplerate=n;
RedrawSpectrum;
axes(h);
  h2=gca;



Contact us at files@mathworks.com