标题:把VB里面的数组读入MATLAB这段程序错在哪?
取消只看楼主
jjlebron
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-9-24
 问题点数:0 回复次数:0 
把VB里面的数组读入MATLAB这段程序错在哪?
Private Sub Command1_Click()
Dim Matlab As Object
Dim pReal(1, 1) As Variant
Dim plmag() As Variant
Dim result As String
Dim i As Integer, j As Integer
Dim dataIn(1, 1) As Variant
             'Rem数组赋值
For i = 0 To 1
For j = 0 To 1
pReal(i, j) = i + j
Next
Next
            ' Rem开启Matlab自动化服务器
Set Matlab = CreateObject("Matlab.Application")
                    ' Rem向Matlab输入数据
Call Matlab.PutFullMatrix("dataIn", "base", pReal, plmag)  这行显示不匹配怎么回事
             'Rem执行计算 (其问调用Matlab的求逆函数)
result = Matlab.Execute("dataOut=inv(dataIn)")
             ' Rem返回数据
Call Matlab.GetFullMatrix("dataOut", "base", pReal, plmag)
搜索更多相关主题的帖子: MATLAB 
2008-10-15 14:51



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-238423-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.092247 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved