#include <oxstd.h>
#include <oxfloat.h>
#include <oxdraw.h>
main()
{
    decl m = rann(100,1), cp = 128;

    DrawSpectrum(0, m', "var", 10);
    DrawTitle(0, "Spectral density (SDF) using DrawSpectrum()");
    
    Draw(1, periodogram(m,10, cp,2)', 0, M_PI / (cp-1));
    DrawTitle(1, "SDF using periodogram(), imode = 2");
    
    Draw(2, periodogram(m,100,cp,0)', 0, M_PI / (cp-1));
    DrawTitle(2, "Periodogram without truncation");
    
    Draw(3, periodogram(m,100,cp,1)', 0, M_PI / (cp-1));
    DrawTitle(3, "Smoothed periodogram without truncation");

//    SaveDrawWindow("draw6.eps");
    ShowDrawWindow();
}
