X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fnlsop.git;a=blobdiff_plain;f=dft.c;h=33f2e97ab7ffeffdea5c01a13333748629716b45;hp=3ce41a40f88c278684353d0797e2f04790cd46a9;hb=a2394a7ace3a3dc8fec5eb88424f94fbdfd99ffa;hpb=dc8e4ecbb7c31b702518a819190facd40f346247 diff --git a/dft.c b/dft.c index 3ce41a4..33f2e97 100644 --- a/dft.c +++ b/dft.c @@ -62,14 +62,13 @@ int main(int argc,char **argv) { // copy back the data, intensity = sqrt(r^2+i^2) max=0; - offy=0; + offt=0; for(y=0;ymax) max=mag[offt]; + offt+=1; } - offy+=fourier.data_len[0]; } printf("found max: %f\n",max); @@ -79,10 +78,17 @@ int main(int argc,char **argv) { if(scale!=0) { printf("scaling image intensity: %d\n",scale); - for(x=0;x