rfft.c
Go to the documentation of this file.
1 #include "../eus.h"
2 
3 pointer FFT(n,argv)
4 int n;
5 pointer argv[];
6 { pointer a;
7  int size;
8  float *wsave;
9 
10  ckarg(1);
11  a=argv[0];
12  if (!isfltvector(a)) error(E_FLOATVECTOR);
13  size=vecsize(a);
14  wsave=(float *)malloc((size*3+15)*sizeof(float));
15  rffti_(&size,wsave);
16  rfftf_(&size,a->c.fvec.fv,wsave);
17  free(wsave);
18  return(a);}
19 
21 int n;
22 pointer argv[];
23 { pointer a;
24  int size;
25  float *wsave;
26 
27  ckarg(1);
28  a=argv[0];
29  if (!isfltvector(a)) error(E_FLOATVECTOR);
30  size=vecsize(a);
31  wsave=(float *)malloc((size*3+15)*sizeof(float));
32  rffti_(&size,wsave);
33  rfftb_(&size,a->c.fvec.fv,wsave);
34  free(wsave);
35  return(a);}
36 
37 eusmain(mod)
38 pointer mod;
39 {
40  defun("FFT",mod,FFT,NULL);
41  defun("INVERSE-FFT",mod,INVFFT,NULL);
42  }
GLfloat n[6][3]
Definition: cube.c:15
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
ckarg(2)
pointer FFT(int n, argv)
Definition: rfft.c:3
union cell::cellunion c
Definition: eus.h:379
eusmain(pointer mod)
Definition: rfft.c:37
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
Definition: eus.c:297
#define NULL
Definition: transargv.c:8
pointer INVFFT(int n, argv)
Definition: rfft.c:20
eusfloat_t fv[1]
Definition: eus.h:307
char a[26]
Definition: freq.c:4
struct floatvector fvec
Definition: eus.h:413


euslisp
Author(s): Toshihiro Matsui
autogenerated on Fri Feb 21 2020 03:20:54