diff options
Diffstat (limited to '70/CH3/EX3.2.1/3_2_1.sci')
-rwxr-xr-x | 70/CH3/EX3.2.1/3_2_1.sci | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/70/CH3/EX3.2.1/3_2_1.sci b/70/CH3/EX3.2.1/3_2_1.sci new file mode 100755 index 000000000..9fb608a03 --- /dev/null +++ b/70/CH3/EX3.2.1/3_2_1.sci @@ -0,0 +1,12 @@ +//page 155 +clear; +close; +clc; +b=[1;2;3]; +disp(b,'b='); +a=[1;1;1]; +disp(a,'a=') +x=(a'*b)/(a'*a) +disp(x*a,'Projection p of b onto the line through a is x^*a='); +disp((a'*b)/(sqrt(a'*a)*sqrt(b'*b)),'cos(thetha)='); +//end
\ No newline at end of file |