I'm trying to use FFT filter on a list of points ( each point has x and y coordinates) i should get in return a list<Complex>
.
when testing the code below (on a list containing 12 points) i get this error
System.ArgumentException : The given array is too small. It must be at least 14 long.
at MathNet.Numerics.IntegralTransforms.Fourier.ForwardReal(Double[] data, Int32 n, FourierOptions options)
I'm actually using Math.net MathNet.Numerics.IntegralTransforms.Fourier.ForwardReal(buffer, buffer.Length, FourierOptions.Matlab);
This is my class's code
// inputs is a List of Point(List<Point> inputs)
var buffer=inputs.Select(p => (p.Y)).ToArray();
try
{
MathNet.Numerics.IntegralTransforms.Fourier.ForwardReal(buffer, buffer.Length, FourierOptions.Matlab);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
Any idea how to fix it ? thank you :)