Private Sub Command1_Click()
Dim x0(0 To 12) As Double
Dim x1(0 To 12) As Double
Dim b(0 To 11, 0 To 1) As Double
Dim bt(0 To 11, 0 To 11) As Double '转置
Dim bc(0 To 1, 0 To 1) As Double '乘积
'Dim bban(2.2) As Double '矩阵的伴随矩阵
Dim bn(0 To 1, 0 To 11) As Double '矩阵的逆矩阵
Dim c1(0 To 11, 0 To 1) As Double
Dim y(0 To 12) As Double
Dim k As Integer
Dim i As Integer
Dim j As Integer
Dim l As Double
Dim a As Double '系数
Dim u As Double '系数
Dim com As Integer
Dim f As Double '最终结果
x0(0) = Val(Text1.Text)
x0(1) = Val(Text2.Text)
x0(2) = Val(Text3.Text)
x0(3) = Val(Text4.Text)
x0(4) = Val(Text5.Text)
x0(5) = Val(Text6.Text)
x0(6) = Val(Text7.Text)
x0(7) = Val(Text8.Text)
x0(8) = Val(Text9.Text)
x0(9) = Val(Text10.Text)
x0(10) = Val(Text11.Text)
x0(11) = Val(Text12.Text)
x0(12) = Val(Text13.Text)
x1(0) = x0(0)
For i = 1 To 12
x1(i) = x1(i - 1) + x0(i)
Next i
For i = 0 To 11
b(i, 0) = (x1(i + 1) + x1(i)) / 2 * (-1) '调试时这行总是b(i,0)为零啊?是因为精度的问题吗
Print b(i, 0)
Next i
问题如上显示
vb二维数组复制问题
答案:2 悬赏:30 手机版
解决时间 2021-01-26 06:29
- 提问者网友:骑士
- 2021-01-25 12:52
最佳答案
- 五星知识达人网友:不甚了了
- 2021-01-25 14:05
Private Sub Form_Load()
Dim b(0 To 11, 0 To 1) As Double
Dim x1(0 To 12) As Double
x1(0) = 4
x1(1) = 2
b(0, 0) = (x1(i + 1) + x1(i)) / 2 * (-1)
MsgBox b(0, 0)
End Sub
测试不为0
你赋值的问题 检查文本框输入的数值吧
Dim b(0 To 11, 0 To 1) As Double
Dim x1(0 To 12) As Double
x1(0) = 4
x1(1) = 2
b(0, 0) = (x1(i + 1) + x1(i)) / 2 * (-1)
MsgBox b(0, 0)
End Sub
测试不为0
你赋值的问题 检查文本框输入的数值吧
全部回答
- 1楼网友:蓝房子
- 2021-01-25 15:05
根据实际情况,自己修改,重在理解
arr(1 to 100 ,101 to 200)
lbound(arr, icol)//icol是指维数组的第几列
redim arr(2 to 100 ,101 to 200)
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯