1 / 38

第六节 极小化方法

第六节 极小化方法. 一、与线性方程组等价的变分问题. 二、最速下降法. 三、共轭斜量法 ( 共轭梯度法 ). 四、预条件共轭斜量法. 一、与线性方程组等价的变分问题. 二、最速下降法. clear;x=-18:0.5:18; y=x'; X=ones(size(y))*x; Y=y*ones(size(x)); Z=0.5*(X.^2+6*Y.^2+4*X.*Y)-(4*X+10*Y); meshc(Z); colormap(hot) xlabel('x'),ylabel('y'),zlabel('z').

lael
Download Presentation

第六节 极小化方法

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第六节 极小化方法 一、与线性方程组等价的变分问题 二、最速下降法 三、共轭斜量法(共轭梯度法) 四、预条件共轭斜量法

  2. 一、与线性方程组等价的变分问题

  3. 二、最速下降法

  4. clear;x=-18:0.5:18; y=x'; X=ones(size(y))*x; Y=y*ones(size(x)); Z=0.5*(X.^2+6*Y.^2+4*X.*Y)-(4*X+10*Y); meshc(Z); colormap(hot) xlabel('x'),ylabel('y'),zlabel('z')

  5. 三、共轭斜量法 (CG) (共轭梯度法)

  6. 公式化简

  7. 公式化简

  8. 四、预条件共轭斜量法(PCG)

  9. 预条件共轭斜量法 实际计算,可通过变换,转化成用原方程组的量来计算。

  10. 预优矩阵的选取 下面介绍几种选取预优矩阵的方案:

  11. MATLAB调用格式: r=cholinc(sa,tol) 或 r=cholinc(sa,’0’) 其中系数矩阵a必须用稀疏形式 sa. Cho.m a=[3,-1,0,2;-1,3,-1,0;0,-1,3,-1;2,0,-1,3]; sa=sparse(a); r=cholinc(sa,'0') full(r)

  12. 预条件共轭斜量法MATLAB的三种调用格式: 1.不用预优矩阵的共轭斜量法 x=pcg(a,b,tol,kmax) 2.用预优矩阵的共轭斜量法 (1)x=pcg(a,b,tol,kmax,m) (2) r=chol(m) x=pcg(a,b,tol,kmax,r’,r,x0) 3.未给定预优矩阵的共轭斜量法 r=cholinc(sa,’0’) x=pcg(a,b,tol,kmax,r’,r,x0)

  13. 二版习题P150----12 三版习题P140----28,29,30

More Related