From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2048/CH6/EX6.1/LS_ex.sce | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 2048/CH6/EX6.1/LS_ex.sce (limited to '2048/CH6/EX6.1') 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) + + -- cgit