Gram-Schmidt算法的matlab程序
Gram-Schmidt算法方面的一些matlab程序matlab的PDE工具自带的代码,仅供参考
function=pdegrmsc(r,v)
%PDEGRMSC Gram Schmidt phase of Arnoldi algorithm.
% A Ruhe 8-08-94.
% Copyright 1994-2001 The MathWorks, Inc.
maxort=4;
qmax=0.7;
=size(v);
rnn=norm(r);
hc=zeros(j,1);
if j>0,
for iort=1:maxort,
hv=v'*r;
hc=hc+hv;
r=r-v*hv;
rnorm=rnn;
rnn=norm(r);
if rnn > qmax*rnorm, break, end;
end;
end;
h=;
y=r/rnn;
谢谢楼主分享~~~~~~ 感谢大家分享
页:
[1]