Results 1 to 2 of 2

Thread: [URGENT, FOR THESIS MATTER] How to Using PINV matlab's function from visual basic

  1. #1

    Thread Starter
    Registered User
    Join Date
    May 2013
    Posts
    1

    [URGENT, FOR THESIS MATTER] How to Using PINV matlab's function from visual basic

    I wanna using pinv for pseudoinverse matlab function from visual basic 6.

    I've tried to make a .m file which contain this code:
    function pinvH = pseduoinv( H )
    matriksH=load(H)
    pinvH=pinv(matriksH)
    end


    and in visual basic 6, i've add matlab automation server and do this code:
    Set matlab = New MLApp.MLApp
    pinvH = matlab.Execute("pseudoinv('" & dataH & "')")
    bobot = pinvH * target

    FYI, dataH is a matriks MxN.

    when i run this, the error messege will be 'dataH isn't a string'. what should i do??
    this is make me crazy.

    somebody have the other way how to make it?
    please help me, thanks a lot

  2. #2
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: [URGENT, FOR THESIS MATTER] How to Using PINV matlab's function from visual basic

    If dataH is an array, you cannot just concatenate it with a string. However, you can concatenate its elements as long as they can be coerced to a String.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

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