<P>Private Sub Command1_Click()<br>L = Array(38.8263, 35.4687, 25.9806, 11.9948, -4.0615, -19.4158, -31.4083, -37.9757, -37.9629, -31.408, -19.4108, -4.0573, 11.9961, 25.9829, 35.4653, 38.823, 35.4619, 25.9784, 11.9957, -4.0606, -19.4149, -31.4044, -37.9785, -37.9743, -31.4093, -19.4135, -4.0569, 11.9971, 25.9795, 35.4636)<br><br>M = Array(0.0014, 15.7895, 28.8524, 36.9273, 38.6135, 33.6208, 22.8189, 8.0678, -8.0705, -22.8217, -33.6211, -38.6107, -36.926, -28.8503, -15.7902, -0.0005, 15.7852, 28.8491, 36.9245, 38.6123, 33.6212, 22.8174, 8.0687, -8.0721, -22.8214, -33.6248, -38.6129, -36.9251, -28.8459, -15.7876)<br><br>N = Array(-2.001, -2.967, -3.9326, -4.8979, -5.863, -6.8282, -7.7937, -8.7601, -9.7259, -10.6904, -11.6543, -12.6209, -13.5862, -14.5507, -15.5175, -16.4838, -17.4502, -18.4149, -19.3811, -20.3463, -21.3115, -22.2779, -23.2418, -24.2071, -25.1726, -26.1366, -27.1026, -28.069, -29.036, -30.0008)<br><br><br>Dim x0(4) As Double<br>z = 0<br>Dim r() As Double<br><br>For k = 1 To 30<br>r(k) = power(minus(msqrt(power(minus(minus(L(k) - x0(1)) - times(x0(3), N(k))), 2), power(minus(minus(M(k) - x0(2)) - times(x0(4), N(k))), 2)), x0(5)), 2)<br>z = plus(z, r(k))<br>Next<br>x0 = Array(0, 0, 1, 1, 38#)'???????????????<br><FONT color=#ff0000>x = fminu(f, x0, Options, g)</FONT></P>
<P>End Sub<br>这个是用引用MATRIXVB 编的程序,为什么vb 提示我说fminu找不到呢,而且在matlab里命令行输入的<br>x0=[0,0,1,1,38.00];到vb里怎么处理啊?</P>
[此贴子已经被作者于2006-6-7 15:13:45编辑过]
|