FFT.mesa
Russ Atkinson (RRA) May 24, 1985 5:39:19 pm PDT
Routines to implement the Cooley-Tukey Fast Fourier Transform, etc.
last modified by McCreight, November 14, 1984 10:42:42 am PST
DIRECTORY
Complex,
Rope;
FFT: CEDAR DEFINITIONS =
BEGIN
Watts, DBM, Volts, Hz, Seconds, Degrees: TYPE = REAL;
CVecRef: TYPE = REF CVec;
CVec: TYPE = RECORD [
totalTime: Seconds ← 1.0,
v: SEQUENCE size: NAT OF Complex.VEC
the sequence must have a size equal to a power of 2
];
NewCVec: PROC [ size: NAT ← 32, totalTime: Seconds ← 1.0, like: CVecRef ← NIL ] RETURNS [ v: CVecRef ];
CopyCVec: PROC [ from: CVecRef ] RETURNS [ v: CVecRef ];
AddCosWave: PROC [ v: CVecRef, freq: Hz, magnitude: Volts ← 1.0, phase: Degrees ← 0.0 ];
AddNoise: PROC [ v: CVecRef, powerPerHz: DBM ← 1.0, ohms: REAL ← 50.0 ];
TimeToFreq, FreqToTime: PROC [ v: CVecRef ];
Print: PROC [ v: CVecRef ] RETURNS [ Rope.ROPE ];
END.