[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Go Figure



PureBytes Links

Trading Reference Links

{ I cant wait to see this for sale under another name someday }


input:length1(30);

vars:sum(0),imgsum(0),maxval(0),masindx(0);

for value2=1 to (length1/2)begin
sum=0;
imgsum=0;
for value1=1 to (length1) begin
sum=sum+c[value2]*cosine((2*3.1415/length1)*(value1-1)*(value2-1));
imgsum=imgsum-c[value2]*sine((2*3.1415/length1)*(value1-1)*(value2-1));
end;

print("MasterIndex=",value2);
if maxval<(sum*sum+imgsum*imgsum)then begin
maxval=(sum*sum+imgsum*imgsum);
masindx=value2;
print("MasterIndex=",value2);
end;
end;

plot1(sine(cum(length1)*(3.1415*2/length1)*(masindx)),"fourrier1");
plot2(sine(cum(length1)*(3.1415*2/length1)),"fourrier2");