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 /2048/CH6/EX6.1/LS_ex.sce | |
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 '2048/CH6/EX6.1/LS_ex.sce')
-rwxr-xr-x | 2048/CH6/EX6.1/LS_ex.sce | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/2048/CH6/EX6.1/LS_ex.sce b/2048/CH6/EX6.1/LS_ex.sce new file mode 100755 index 000000000..25b3076d7 --- /dev/null +++ b/2048/CH6/EX6.1/LS_ex.sce @@ -0,0 +1,11 @@ +// Least squares solution of the simple problem discussed in Example 6.4 on page 164
+// 6.1
+
+Mag = 10; V = 10; No_pts = 100; theta = 2;
+Phi = Mag * (1-2*rand(No_pts,1));
+E = V * (1-2*rand(No_pts,1));
+Z = Phi*theta + E;
+LS = Phi \ Z
+Max = max(Z ./ Phi), Min = min(Z ./ Phi)
+
+
|