MATLAB ファイルを、Visual Basic アプリケーションから ActiveX を使用してコールすることはできますか?
9 ビュー (過去 30 日間)
古いコメントを表示
MATLAB ファイルを、Visual Basic アプリケーションから ActiveX を使用してコールする方法を教えてください。
採用された回答
MathWorks Support Team
2013 年 6 月 19 日
以下のサンプルをご覧ください。
Dim MatLab As Object
Private Sub Command1_Click()
Dim Result As String
Dim MReal(1, 3) As Double
Dim MImag() As Double
Set MatLab = CreateObject("Matlab.Application")
'CALLING MATLAB FILE FROM VB
Result = MatLab.Execute("cd D:\MATLABR12\work\alltest")
Result = MatLab.Execute("myfile")
'OTHER THINGS THAT CAN BE DONE
Result = MatLab.Execute("surf(peaks)")
Result = MatLab.Execute("a = [1 2 3 4; 5 6 7 8;]")
Result = MatLab.Execute("b = a + a ")
Call MatLab.GetFullMatrix("b", "base", MReal, MImag)
End Sub
詳細の情報については、MATLAB のヘルプの外部インターフェースの章をご覧ください。
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で ActiveX についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!