求助 用VF编写高斯消元发
那位大侠有用VF编写高斯消元发,解线性方程组
用高斯消元法求解方程组AX=B,其中A为n×n阶方阵,X为n阶列向量是n个未知数,B为n阶列向量。
for i=1 to n
t=a(i,i)
for j=1 to n
a(i,j)=a(i,j)/t
endfor
b(i)=b(i)/t
for k=1 to n
if k#i
t=a(k,i)
for j=1 to n
a(k,j)=a(k,j)-a(i,j)*t
endfor
b(k)=b(k)-b(i)*t
endif
endfor
endfor