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 --- 243/CH10/EX10.5/10_5.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 243/CH10/EX10.5/10_5.sce (limited to '243/CH10/EX10.5/10_5.sce') diff --git a/243/CH10/EX10.5/10_5.sce b/243/CH10/EX10.5/10_5.sce new file mode 100755 index 000000000..578cc3880 --- /dev/null +++ b/243/CH10/EX10.5/10_5.sce @@ -0,0 +1,18 @@ +//Example No. 10_05 +//Plane Fitting +//Pg No. 342 +clear ; close ; clc ; + +x = 1:4 +z = 0:3 +y = 12:6:30 +n = length(x) //Number of data points +m = 3 //Number of unknowns +G = [ ones(1,n) ; x ; z] +H = G' +C = G*H +B = y*H +D = C\B' +disp(C,B) +disp(D) +mprintf('\n The regression plane is \n y = %i + %f*x + %i*z ',D(1),D(2),D(3)) \ No newline at end of file -- cgit