⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldltup.m

📁 这是在网上下的一个东东
💻 M
字号:
%% [newL,newD]=ldltup(L,D,v)%% This function updates the Cholesky factorization of A to the Cholesky % factorization of A+vv'.  i.e. If%%    A=L*D*L'%% then%%    A+v*v'=newL*newD*newL'%% It is assumed that A is symmetric and postive definite.%% Reference: Gill, Murray, and Wright, "Practical Optimization", p43.% Author: Brian Borchers (borchers@nmt.edu)%function [newL,newD]=ldltup(L,D,v)%%  First, find the size of the matrix.  %n=size(L,1);%%  Initialize newL, newD, and t.%newL=L;newD=D;oldt=1;%%  The main loop.  See Gill, Murray, and Wright for details.  %for j=1:n  p=v(j);  t=oldt+p^2/D(j,j);  newD(j,j)=D(j,j)*t/oldt;  beta=p/(D(j,j)*t);  if (j < n)    v(j+1:n)=v(j+1:n)-p*L(j+1:n,j);    newL(j+1:n,j)=L(j+1:n,j)+beta*v(j+1:n);  end  oldt=t;end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -