以文本方式查看主題

-  曙海教育集團(tuán)論壇  (http://www.scb-ycwb.com/bbs/index.asp)
--  VB語言  (http://www.scb-ycwb.com/bbs/list.asp?boardid=77)
----  vb語言實(shí)現(xiàn)的卡爾曼濾波源程序  (http://www.scb-ycwb.com/bbs/dispbbs.asp?boardid=77&id=2608)

--  作者:wangxinxin
--  發(fā)布時間:2010-12-14 14:47:56
--  vb語言實(shí)現(xiàn)的卡爾曼濾波源程序
(沒有測試,輸出部分要配合相應(yīng)的過程)

Dim num1, num2, num3
Dim a(), a1(), e() As Single
Dim alf, xgm(), p(), k1(), k2, k(), p1(), p2(), c(), c1, k3(), k4(), cc() As Single
Private Sub Command1_Click()
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Input As #1
num3 = Val(Text1.Text) + 2
num2 = Val(Text2.Text)
ReDim a(num3, num2)
For j = 1 To num3
For i = 1 To num2
Input #1, a(j, i)
Next i
Next j
Close #1

End Sub

Private Sub Command2_Click()
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Append As #2

For i = 1 To num2
Print #2, cc(i, 1), cc(i, 2), cc(i, 3)
Next i

Close #2
Shell "c:\\windows\\notepad " & CommonDialog1.FileName
End Sub

Private Sub Command3_Click()

num1 = Val(Text1.Text) + 1
num2 = Val(Text2.Text)
num3 = Val(Text1.Text) + 2
ReDim a1(num2), e(num1, num2) As Single
ReDim xgm(num1), p(num1, num1), k1(num1), k(num1), p1(num1, num1), p2(num1, num1), c(num1), k3(num1), k4(num1), cc(num2, num1) As Single





c(1) = c(2) = c(3) = 0
r = 0.000001
alf = 10
For j = 1 To num1
For i = 1 To num2
e(j, i) = a(j, i)
a1(i) = a(num3, i)
Next i
Next j
For x = 1 To num1
xgm(x) = alf * Sqr(r / e(x, 1))
p(x, x) = xgm(x) ^ 2
Next x

For q = 1 To num2
For i = 1 To num1
k3(i) = k4(i) = 0
Next i
k2 = 0
For i = 1 To num1
For j = 1 To num1
p1(i, j) = p2(i, j) = 0
Next j
Next i
c1 = 0

For m = 1 To num1
k3(m) = 0
For n = 1 To num1
k3(m) = k3(m) + e(n, q) * p(n, m)
Next n
Next m

For m = 1 To num1
k4(m) = 0
k4(m) = k4(m) + 1000 * k3(m) * e(m, q)
Next m

For i = 1 To num1
k2 = k2 + k4(i)
Next i

For v = 1 To num1
k(v) = 0
k(v) = k3(v) * (k2 / 1000 + r) ^ -1
Next v

For i = 1 To num1
For j = 1 To 3
p1(i, j) = k(i) * e(j, q)
Next j
Next i

For l = 1 To num1
For i = 1 To num1
p2(l, i) = 0
For j = 1 To num1

p2(l, i) = 1000 * p1(l, j) * p(j, i) + p2(l, i)
Next j
Next i
Next l

For i = 1 To num1
For j = 1 To num1
p(i, j) = p(i, j) - p2(i, j) / 1000
Next j
Next i

For i = 1 To num1
c1 = c1 + e(i, q) * c(i)
Next i
For i = 1 To num1
c(i) = c(i) + k(i) * (a1(q) - c1)

Next i


For i = 1 To num1

cc(q, i) = c(i)
Next i
Next q

End Sub

Private Sub Command4_Click()
End
End Sub

主站蜘蛛池模板: 国产成人av在线免播放观看| 国产精品亚洲а∨无码播放不卡| 亚洲人成影院在线无码按摩店| 韩国亚洲伊人久久综合影院| 好大好湿好硬顶到了好爽视频 | 最新免费jlzzjlzz在线播放| 国产va免费精品高清在线| 99热在线只有精品| 日韩电影免费在线观看中文字幕| 公与秀婷厨房猛烈进出视频| 丝袜情趣在线资源二区| 成在线人视频免费视频| 亚洲日韩国产成网在线观看 | 无码A级毛片免费视频内谢| 亚洲综合精品第一页| 麻豆91免费视频| 天天爱天天操天天射| 久久精品麻豆日日躁夜夜躁| 猴哥影院在线播放视频| 国产情侣真实露脸在线| av无码东京热亚洲男人的天堂| 日韩精品无码人妻免费视频| 伦理片中文字幕2019在线| 麻豆av一区二区三区| 在车子颠簸中进了老师的身体| 久久精品WWW人人爽人人| 波多野结衣黑丝| 国产一区二区精品人妖系列| 18禁美女黄网站色大片免费观看| 成人欧美一区二区三区的电影| 亚洲国产美女精品久久| 精品少妇人妻AV一区二区三区| 国产福利在线观看你懂的| yy111111影院理论大片| 日韩欧美在线综合| 亚洲福利在线观看| 美女扒开裤子让男人桶视频| 国产片免费在线观看| aa级黄色大片| 无码精品久久久天天影视| 亚洲乱码国产乱码精品精|