|
-
May 20th, 2013, 01:32 AM
#1
Thread Starter
Registered User
[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
-
May 21st, 2013, 08:53 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|