An external function to carry out FFT
function _fft input Integer dir = 1 "Calculation direction: 1 - forward; -1 - backward"; input Integer m = 3 "Data points = 2^m"; input Real[:] x = {i for i in 1:8} "Real part of the data"; input Real[:] y = {0, 0, 0, 0, 0, 0, 0, 0} "Imaginary part of the data"; output Real[:] x_out = x "Real part of the result"; output Real[:] y_out = y "Imaginary part of the result"; end _fft;