define N (8*4096) set x=1,$N erase window 1 1 1 1 limits 0 1024 -5 5 box ptype 1 1 # generate a lot of points to uniformly cover -0.5 to 0.5 # -and- at the same time do averages of 10 samples => pseudo-gaussian set y=x*0 do i=1,10 { set t=random($N)-0.5 set y=y+t } # prepare and plot the pseudo gaussian points set y[0]=0 set y[$($N-1)]=0 set y=y/1.5 set s=0.01*cos(6.2832*x/128) set s= 50-(x%128)==0? 0.5:0 set s= abs(50-(x%128))==1? 0.4:s set s= abs(50-(x%128))==2? 0.3:s set s= abs(50-(x%128))==3? 0.2:s set s= abs(50-(x%128))==4? 0.1:s set y=y+s # print data.6 {y } # FIRST PLOT: a bit of the data # connect x y cursor # SECOND PLOT: the whole power spectrum set yi=0*y set ynew=y*-1.0**int(x) fft 1 ynew yi re im set a=(re*re+im*im) limits x a erase box connect x a stats a ave sig kur echo ... echo stats a ave sig kur echo ave=$ave sigma=$sig echo ... echo vecminmax a mn mx vecminmax a mn mx echo min=$mn max=$mx echo cursor # THIRD PLOT: the positive, low frequency power spectrum. erase set x=x-(1+$N/2) limits 0 2048 a box connect x a