VB常用数值算法集 内含有解线性代数方程组

源代码在线查看: d2r2.txt

软件大小: 1879 K
上传用户: whyzhao
关键词: 数值算法 解线性 方程
下载地址: 免注册下载 普通下载 VIP

相关代码

				Private Sub Command1_Click()
				    'PROGRAM D2R2
				    'DRIVER for routine RATINT
				    NPT = 6
				    Dim X(6), Y(6)
				    For I = 1 To NPT
				        X(I) = I * 2# / NPT
				        Y(I) = FUNC(X(I))
				    Next I
				    Print
				    Print Tab(5); "Diagonal rational function interpolation"
				    Print Tab(5); " x       interap.    accuracy       actual"
				    For I = 1 To 10
				        XX = 0.2 * I
				        Call RATINT(X(), Y(), NPT, XX, YY, DYY)
				        YEXP = FUNC(XX)
				        Print Tab(5); Format$(XX, "#.#0");
				        Print Tab(13); Format$(YY, ".####00");
				        Print Tab(25); Format$(DYY, ".0000E+00");
				        Print Tab(40); Format$(YEXP, ".######")
				    Next I
				End Sub
				Function FUNC(X)
				    FUNC = X * Exp(-X) / ((X - 1#) ^ 2 + 1#)
				End Function			

相关资源