From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 413/CH5/EX5.1/Example_5_1.sce | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 413/CH5/EX5.1/Example_5_1.sce (limited to '413/CH5/EX5.1/Example_5_1.sce') diff --git a/413/CH5/EX5.1/Example_5_1.sce b/413/CH5/EX5.1/Example_5_1.sce new file mode 100644 index 000000000..1756bc344 --- /dev/null +++ b/413/CH5/EX5.1/Example_5_1.sce @@ -0,0 +1,11 @@ +clc +clear +x=[1.6 1.8 2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8]; +F=[4.953 6.05 7.389 9.025 11.023 13.464 16.445 20.086 24.533 29.964 36.594 44.701] +for i=1:12 +X=[x(1,i), F(1,i)] +disp(X) +end +A=(0.2/2)*[(6.05+29.964)+2*(7.389+9.025+11.023+13.464+16.445+20.086+24.533)] +printf('Answer by Trapezoidal Rule to estimate the integral from x=1.8 to x=3.4') +disp(A) \ No newline at end of file -- cgit