The realization of projection matrix and orthogonal vector

Source: Internet
Author: User

Because my posts here are basically written to their own memories, so the principle of the formula is not written out, want to know the students can go to see the linear algebra of NetEase public class about projection and orthogonal matrix that episodes

I give the MATLAB code here, if you have a topic to do, directly input the corresponding matrix into the line

function [xnew, Projection_matrix] =Projectin (Xold, xbasis)%Xold is the column vector to be projected%Xbasis is a set of bases for projection space%Projection_matrix is the projection matrix obtained%xnew is the orthogonal vector that is obtained, that is, a vector orthogonal to the projection space.%Given a set of vectors[A1,a2,a3]=M=[1,1,1;1,2,3;1,4,9]m can be put into MATLAB code, the first is written to express%to orthogonal A1 A2 A3, then the A1 as a base, a2 as a projection vector input, and then the orthogonal A1 A2 as the projection space, A3 as a projection vector input to get the following matrix%M=[1,1,1;1,0,-1;1/3,-2/3;1/3]; Projection_matrix=(xbasis)/(xbasis'*xbasis) *xbasis'; Xnew=Xold-Projection_matrix*Xold;End

The realization of projection matrix and orthogonal vector

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.