SpHr_OctaveSmooth [ /Dest=[destWaveName] ] OctaveDenom, srcWaveName


Smooths amplitude or phase spectra using a window that varies with frequency.


Parameters

OctaveDenom  Window length is equal to 1/OctaveDenominator, specified in terms of srcWave's x-scaling.


srcWaveName  Specification for single precision source wave. srcWaveName is overwritten if the /Dest flag is omitted.


Flags

/Dest = [ destWaveName ]

    Smoothed values are written to the wave specified by destWaveName.

/Dest

    If no wave is specified by destWaveName, smoothed values are written to a wave named srcWaveName plus the suffix "_OctSmth "

    

Example

Function SpHr_OctaveSmooth_Example()

    variable fs = 48000

    // 1/f noise with 30 Hz Highpass filter

    SpHr_SignalGaussian/ms=200/Sp=1/HP=30/dB=70/Ramp=10 fs, Noise

    SpHr_DFTSpectrum /Mag=Mag/dB Noise

    SpHr_OctaveSmooth /Dest=MagSmoothed 6, Mag

    Display /W=(49,100,557,364)/K=1 Mag, MagSmoothed as "Octave Smooth"

    ModifyGraph log(bottom)=1

    Label left "amplitude (\\U)"; Label bottom "frequency (\\U)"

    ModifyGraph rgb(MagSmoothed)=(0,0,0),rgb(Mag)=(34952,34952,34952)

    ModifyGraph lsize(Mag)=0.5,lsize(MagSmoothed)=0.75

    TextBox/C/N=text0/F=0/H={15,0,5}/B=1/A=LB/X=10.00/Y=20.00 "\\s(Mag) DFT Magnitude\r\r\\s(MagSmoothed) Octave smoothed"

End

Contact: Brian