24小时热门版块排行榜    

查看: 220  |  回复: 0

jydtjm

新虫 (初入文坛)

[求助] 帮忙看一下这段程序的思路是什么

while resid_newton>1e-6   
     [d,FLAG,RELRES,ITER] = pcg(@(u)Coef(beta,Hmatrix,u,x0,Mx,Nx,Mzcol,p),f0,tol,maxit,[],[],[]);
%      [d,FLAG,RELRES,ITER] = pcg(@(u)Coef(beta,Hmatrix,u,x0,Mx,Nx,Mzcol,p),f0,tol,maxit,@(u)Preinverse(beta,Hmatrix,u,x0,Mx,Nx,Mzcol,p),[],[]);
     RELRES
     x1=x0+d;   
     f1=-fxklu(beta,Hmatrix,x1,Mx,Nx,Mzcol,g,p);  F1=norm(f1,'fro');   functionvalue=[functionvalue,F1];   %%%the norm of equations  value at u1
     resid_newton=F1/F0;
     resid_newton_value=[resid_newton_value,resid_newton];
     ITER_set=[ITER_set;ITER];
   
     recovered_x=reshape(real(x1(1:Mxcol)),Mx,Nx);
     
%      in1=(recovered_x<0); recovered_x(in1)=0.001;
%      in2=(recovered_x>1); recovered_x(in2)=1;
     
     Image_Re_Err_recovered=norm(recovered_x-X,'fro')/norm(X,'fro');
     Image_Re_Err=[Image_Re_Err,Image_Re_Err_recovered];
     fprintf('%3.0fth iteration: ITER1=%2.0f,ReErr=%6.4f, \n', iter,ITER,Image_Re_Err_recovered);
     
%      figure;
%      imagesc(recovered_x);axis image; axis off;colormap  gray;
   
     x0=x1; f0=f1;  %index=(x1(1:Mxcol) <0); x1(index)=0;
     iter=iter+1;   %min(min(x1(N^2+1:end)))
     num=[num,iter];
     if iter>5, break, end
end
帮忙看一下这段程序的思路是什么
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 jydtjm 的主题更新
信息提示
请填处理意见