diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3588/CH6/EX6.9/EX6_9.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3588/CH6/EX6.9/EX6_9.sce')
-rw-r--r-- | 3588/CH6/EX6.9/EX6_9.sce | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/3588/CH6/EX6.9/EX6_9.sce b/3588/CH6/EX6.9/EX6_9.sce new file mode 100644 index 000000000..a3b8be5c6 --- /dev/null +++ b/3588/CH6/EX6.9/EX6_9.sce @@ -0,0 +1,30 @@ +//Clearing console +clc +clear + +//Intializing variables +r(1) = sqrt(3)/3 +r(2) = -sqrt(3)/3 +s(1) = sqrt(3)/3 +s(2) = -sqrt(3)/3 +t(1) = 0 +t(2) = 0.7745967 +t(3)= -0.7745967 + +Wt(1)= 0.8888889 +Wt(2) = 0.5555556 +Wt(3) = 0.5555556 +//Not considering weight factors for cubic and quadratic functions as they are 1 + +I = 0 +//Gaussian quadrature Integration +for k =1:3 + for j =1:2 + for i =1:2 + I = I + Wt(k)*((r(i))^2)*((s(j))^2 -1)*((t(k))^4 -2) + end + end +end + +printf('\nResults') +printf('\nIntegration of given function I =%f',I) |