VB常用数值算法集1 VB常用数值算法集1

源代码在线查看: tridag.txt

软件大小: 485 K
上传用户: tiebob
关键词: 数值算法
下载地址: 免注册下载 普通下载 VIP

相关代码

				Sub TRIDAG(A(), B(), C(), R(), U(), N)
				    NMAX = 100
				    Dim GAM(100)
				    If B(1) = 0# Then Exit Sub
				    BET = B(1)
				    U(1) = R(1) / BET
				    For J = 2 To N
				        GAM(J) = C(J - 1) / BET
				        BET = B(J) - A(J) * GAM(J)
				        If BET = 0# Then Exit Sub
				        U(J) = (R(J) - A(J) * U(J - 1)) / BET
				    Next J
				    For J = N - 1 To 1 Step -1
				        U(J) = U(J) - GAM(J + 1) * U(J + 1)
				    Next J
				End Sub			

相关资源