Hi Sean
Looks quite good already.
The original code specified MATLAB conventions. Assuming you want the same behavior, you should declare that in Math.NET Numerics as well. Both FourierForward and FourierInverse have overloads that accept a FourierOptions parameter.
Then, regarding complex number types: We generally use the existing double-precision type
We do not recommend to use the portable library in scenarios where the full library is supported. But you may need to add a reference to System.Numerics to get the Complex type in .Net 4 projects.
Not sure where the
Thanks,
Christoph
Looks quite good already.
The original code specified MATLAB conventions. Assuming you want the same behavior, you should declare that in Math.NET Numerics as well. Both FourierForward and FourierInverse have overloads that accept a FourierOptions parameter.
FourierOptions.Matlab
is the equivalent one.Then, regarding complex number types: We generally use the existing double-precision type
Complex
from the System.Numerics assembly from the official .Net Base Class Libraries. However, System.Numerics does not contain an equivalent single-precision type, that's why we provide our own Complex32
type. Unfortunately System.Numerics is not available in one of the portable library configurations at all, that's why in the portable library we also provide a replacement Complex
type as well - but not in the full library.We do not recommend to use the portable library in scenarios where the full library is supported. But you may need to add a reference to System.Numerics to get the Complex type in .Net 4 projects.
Not sure where the
Complex64
type you mentioned comes from? There is no such type in Math.NET Numerics.Thanks,
Christoph