lib
clib
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
20
pointer
INVFFT
(
n
,argv)
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
}
E_FLOATVECTOR
@ E_FLOATVECTOR
Definition:
eus.h:981
defun
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
FFT
pointer FFT(int n, argv)
Definition:
rfft.c:3
NULL
#define NULL
Definition:
transargv.c:8
INVFFT
pointer INVFFT(int n, argv)
Definition:
rfft.c:20
error
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
Definition:
eus.c:297
cell
Definition:
eus.h:381
eusmain
eusmain(pointer mod)
Definition:
rfft.c:37
a
char a[26]
Definition:
freq.c:4
n
GLfloat n[6][3]
Definition:
cube.c:15
ckarg
ckarg(2)
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43