Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Matlab function in VB.NET does not work. What's wrong with it?

$
0
0
I decided to try COM library testing_COM.dll created by Matlab Builder NE in VB.net.

Function in Matlab:

function t = test(n)
t=sqrt(n);
end

Registered library in Windows, added reference COM in VB.net and than imported in my vb project:

Imports testing_COM

Created class variable:

Dim calcul As testing_COM.Class1

When I try to call this Matlab function test() :

MsgBox(calcul.test(16))

Instead of result "4", VB.net shows up errors:

Error 1 Argument not specified for parameter 'n' of 'Public Sub test(nargout As Integer, ByRef t As Object, n As Object)'.
Error 2 Argument not specified for parameter 't' of 'Public Sub test(nargout As Integer, ByRef t As Object, n As Object)'.

Does anybody know what is wrong with this function?

Thanks.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>