VB常用数值算法集
内含有解线性代数方程组
源代码在线查看: d9r7.txt
Private Sub Command1_Click()
'PROGRAM D9R7
'Driver for routine FLEG
NVAL = 5
DX = 0.2
NPOLY = 5
Dim AFUNC(5)
Print Tab(5); "Legendre Polynomials"
Print Tab(10); "N=1 N=2 N=3 N=4 N=5"
For I = 1 To NVAL
X = I * DX
Call FLEG(X, AFUNC(), NPOLY)
Print Tab(5); "X = "; X
For J = 1 To NPOLY
Print Tab(J * 8); Format$(AFUNC(J), ".###0");
Next J
Print Tab(48); "routine FLEG"
For J = 1 To NPOLY
Print Tab(J * 8); Format$(PLGNDR(J - 1, 0, X), ".###0");
Next J
Print Tab(48); "routine PLGNDR"
Print
Next I
End Sub