diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /70/CH3/EX3.4.4 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '70/CH3/EX3.4.4')
-rwxr-xr-x | 70/CH3/EX3.4.4/3_4_4.sci | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/70/CH3/EX3.4.4/3_4_4.sci b/70/CH3/EX3.4.4/3_4_4.sci new file mode 100755 index 000000000..b6e3a85e0 --- /dev/null +++ b/70/CH3/EX3.4.4/3_4_4.sci @@ -0,0 +1,16 @@ +//page 166 +clear; +close; +clc; +disp('y=C+Dt'); +disp('Ax=b'); +A=[1 -3;1 0;1 3]; +disp(A,'A='); +y=rand (3,1); +disp(y,'y='); +disp('the columns of A are orthogonal,so') +x=zeros(1,2); +disp(([1 1 1]*y)/(A(:,1)'*A(:,1)),'C^ ='); +disp(([-3 0 3]*y)/(A(:,2)'*A(:,2)),'D^ =') +disp('C^ gives the besy fit ny horizontal line, whereas D^t is the best fit by a straight line through the origin.') +//end
\ No newline at end of file |