I want to use FFT function from ILNumerics Library (open source) exception raised

782 Views Asked by At

I Want to use FFT function from ILNumerics Library but its raising an exception. What could probably be wrong. I am using VB.NET (VB EXpress 2010)

Imports System.Math
Imports OpenTK
Imports ILNumerics.ILMath
Imports System.Runtime.InteropServices

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    Dim a As ILNumerics.ILInArray(Of Double) = {10, 20, 30, 40, 89, 90, 98, 90}
    Dim result As ILNumerics.ILRetArray(Of ILNumerics.complex)

    Try
        result = fft(a)
    Catch ex As Exception

        Dim s As Integer
        s = 5 + 5
    End Try



End Sub



<DllImport("ilnumerics_32_x86\mkl_custom.dll")> _
Private Shared Function fft(ByVal a As ILNumerics.ILInArray(Of Double)) As ILNumerics.ILRetArray(Of ILNumerics.complex)

End Function
1

There are 1 best solutions below

0
On

There is no need to define any dll imports. Just use the commin n- dimensional ILArrays and any of the ILMath.fftXX() functions: http://ilnumerics.net/FFTILMath.html

It works best with the ILNumerics nuget package. it installs all native dependencies automatically and also handles both bitrates (64 vers. 32 bit).

You should also take a look at the documentation on how to use ILNumerics arrays properly: http://ilnumerics.net/FunctionRules.html

Merry Christmas! :)