剩下代码传不上来好拙计。。。 %乔列斯基分解function result=try2(A)[m,n]=size(A); if m~=n disp('please input a positive and square matrix') end return G=zeros(n,n); G(1,1)=sqrt(A(1,1)); G(2:n,1)=A(2:n,1)/G(1,1); for j=2:n-1 G(j,j)=sqrt(A(j,j)-sum(G(j,1:j-1)^2)); for i=j+1:n G(i,j)=(A(i,j)-sum(G(i,1:j-1)*G(j,1:j-1)))/G(j,j); end end G(n,n)=sqrt(A(n,n)-sum((G(n,1:n-1))^2)); G @zzy717565 麻烦啦~