Demonstrates numerical processing and signal analysis concepts. This example showcases array pre-allocation with 'SetLength', floating-point arithmetic, and the use of the standard math library for complex numerical calculations.
const N = 8;
var x : array of Float;
x.SetLength(2 * N);
for var i := 0 to N - 1 do begin
x[2 * i] := i;
x[2 * i + 1] := 0;
end;
// Just print input to verify it runs
Print('Input: ');
for var i := 0 to N - 1 do
Print(x[2 * i].ToString(1) + ' ');
PrintLn('');
Input: 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0