home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / fftlib / fft_go_proc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-22  |  1013 b   |  42 lines

  1. /*
  2. ### procedure for computing Fourier spectra ###
  3. */
  4. #include <stdio.h>
  5.  
  6. void fft_go_proc()
  7. {
  8.     void graph_proc(),fft_compute(),fft_write();
  9.     extern FILE *fp_graph_tochild;
  10.     extern int graph_logx,graph_logy;
  11.     extern int tser_len,tser_data_option;
  12.     extern char string2[],string[],source_dir[];
  13.  
  14.     all_reset();
  15.  
  16.     /* copy time series from orbits if necessary */
  17.     if(tser_data_option==0)
  18.         tser_copy();
  19.  
  20.     /* set the length of fourier input data */
  21.     fft_set_len();
  22.  
  23.     graph_logx = 0;
  24.     graph_logy = 1;
  25.     /* set log flags */
  26.         if(graph_logx ==1 && graph_logy ==1)
  27.                 sprintf(string,"-x l -y l");
  28.         else if(graph_logx ==1)
  29.                 sprintf(string,"-x l");
  30.         else if(graph_logy ==1)
  31.                 sprintf(string,"-y l");
  32.         else
  33.                 sprintf(string,"");
  34.         
  35.     sprintf(string2,"%s/bin/sgraph -x 0 %d -m 1 %s",source_dir,tser_len,string);
  36.     graph_proc(string2);
  37.     fft_malloc();
  38.     fft_compute(fp_graph_tochild);
  39.     fft_write(fp_graph_tochild);
  40.     fclose(fp_graph_tochild);
  41. }
  42.