Results 1 to 16 of 16

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

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    9

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

    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.
    Last edited by Reprod; May 12th, 2013 at 04:10 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width