blob: 4379185e2e88c85b1bc755fd26549f97eb36dd20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//page 175
clear;
close;
clc;
disp('If we project b=(x,y,z) onto the x-y plane then its projection is p=(x,y,0),and is the sum of projection onto x- any y-axes.')
b=rand(3,1);
q1=[1;0;0];
disp(q1,'q1=');
q2=[0;1;0];
disp(q2,'q2=');
P=q1*q1'+q2*q2';
disp(P,'Overall projection matrix,P=');
disp('and,P[x;y;z]=[x;y;0]')
disp('Projection onto a plane=sum of projections onto orthonormal q1 and q2.')
//end
|