Fast Fourier transform
function fft import Modelica.ComplexMath.*; input Complex[:] x = {Complex(re = 1, im = 0), Complex(re = 2, im = 0), Complex(re = 3, im = 0), Complex(re = 4, im = 0), Complex(re = 5, im = 0), Complex(re = 6, im = 0), Complex(re = 7, im = 0), Complex(re = 8, im = 0)} "The vector to be transformed"; input Integer n = 8 "Number of data points to be calculated"; output Complex[size(x, 1)] y "The result"; end fft;