Introduction to Scientific Computing - - A Matrix Vector Approach Using Matlab Written by Charles Loan 陈文斌 Wbchen @ fudan . edu . cn 复旦大学 Chapter 7 The QR and Cholesky Factorizations ? Least Squares Fitting ? The QR factorization ? The Cholesky Factorization ? High-Performance Cholesky Least Squares Fitting ???????????????????????1 1 065 43 21 21xx2 minimize to find , and Given b Ax RxRbRA n m nm????? overdetermined overdetermined Setting Up Least Squares Problems ]1,25 [.,)(??xxxf??????? mi ii mxx 1 2)(),(????? 22 2 1 2 11 1 1),(???????????????????????????????? m m mf f fx x x???????? 1 1 m = 100, alpha = , beta = Matlab ’ s Least Squares Tools xLs =A\b; xLs =A\b; 1 1 m = 2, alpha = , beta = ??????),( )( 75 . 1 1 25 . 2????????????????? dxxxxxm mi ii0,0???????????? Minimizer ??????????????????????????? 80 31 12 7 64 21 32 15 32 15 4 3 * *??????????????? 651851851 .0 37037037 .0 * *?? polyfit polyfit If we try to fit data point in the least squares sense with a polynomial of degree d , the m-by-(d+1) least squares problems arises. Matlab ’ s Least Squares Tools Matlab ’ s Least Squares Tools 2 min b Ax nRx?? is equivalent to a transformed problem ???? 2 minbQxAQ T TRx n?? orthogonal IQQ QQ TT,?? 22 22rrQ T?????????) cos( ) sin( ) sin( ) cos( ????Q The column of an orthogonal matrix define an orthonormal basis ???? 2 4 3 2 12 1 22 12 11 2 200 00 0 min min min 2 2 2??????????????????????????????????????c c c cx xr rr bQxAQ b Ax Rx T TRx Rx??????????????????? 2 12 1 22 12 110c cx xr rr 24 232 2 2 b Ax b Ax Ls Rx?????? QR A? QR factorization problem QR factorization problem To find an orthonormal basis for the subspace defined by the columns of A ),(*) (:, ),2(*)2 (:,),1(*)1 (:,) (:,jjRjQjRQjRQjA????? Any column of A is in the span of {Q(:,1), …,Q(:,n)} ?????????
matlab实验课件 来自淘豆网www.taodocs.com转载请标明出处.