summaryrefslogtreecommitdiff
path: root/3369/CH4/EX4.5/Ex4_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '3369/CH4/EX4.5/Ex4_5.sce')
-rwxr-xr-x3369/CH4/EX4.5/Ex4_5.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/3369/CH4/EX4.5/Ex4_5.sce b/3369/CH4/EX4.5/Ex4_5.sce
new file mode 100755
index 000000000..e78b58fc0
--- /dev/null
+++ b/3369/CH4/EX4.5/Ex4_5.sce
@@ -0,0 +1,11 @@
+//Chapter 4, Exmaple 5, page 141
+//Claculate minimum distance to produce avalanche of size 10^19
+clc
+clear
+//Rewriting equation 4.2 and converting it into quadratic equation
+x=poly(0,"x");
+p=43.75-4*10**4*x+7.5*10**5*x^2 // making the polinomial equation
+r= roots(p) //obtaining the roots
+printf("\n Minimum distance = %f m",r(2)) // other root is disregarded
+
+//Answer may vary due to round of error.