フィルターのクリア

Running MATLAB functions in vba client through automation server

4 ビュー (過去 30 日間)
MFB
MFB 2020 年 7 月 24 日
編集済み: MFB 2020 年 7 月 24 日
Sub Main()
Dim Matlab As Object
Dim Xreal(143,1) As Double
Dim Ximag(143,1) As Double
Dim result As String
Dim i,j As Integer
Set Matlab = CreateObject("matlab.application")
MsgBox("wait for the prompt....")
Matlab.Execute("rng 'shuffle';")
Matlab.Execute("p = sobolset(2,'Skip',1e3,'Leap',1e2);")
Matlab.Execute("p = scramble(p,'MatousekAffineOwen');")
result = Matlab.Execute("X0 = net(p,144));")
Matlab.GetFullMatrix("X0","base",Xreal,Ximag)
For i = 0 To 143
For j = 0 To 1
ReportInformationToWindow(Xreal(i,j))
Next
Next
End Sub
I am running this code in order to execute MATLAB functions from VBA client. I am unable to get values from MATLAB automation server. It produces error:
Error in macro execution, please check:
(&H80020009) Exception 80020009
(Matlab.GetFullMatrix("X0","base",Xreal,Ximag))

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by