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 /2915/CH4/EX4.12/Ex4_12.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 '2915/CH4/EX4.12/Ex4_12.sce')
-rwxr-xr-x | 2915/CH4/EX4.12/Ex4_12.sce | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/2915/CH4/EX4.12/Ex4_12.sce b/2915/CH4/EX4.12/Ex4_12.sce new file mode 100755 index 000000000..dd879f272 --- /dev/null +++ b/2915/CH4/EX4.12/Ex4_12.sce @@ -0,0 +1,12 @@ +clc,clear
+//Example 4.12
+//To determine area of segment formed by a chord in circle
+
+radius = 2
+chord = 3
+//Use law of cosines
+cos_theta = (radius^2+radius^2-chord^2)/(2*radius*radius)
+theta=acos(cos_theta) //subtended central angle in radians
+
+area_K=radius^2* (theta-sin(theta))/2
+printf('Required area of segment = %.3f square units',area_K)
|