summaryrefslogtreecommitdiff
path: root/3369/CH4/EX4.5/Ex4_5.sce
blob: e78b58fc0ac3a09a039b3284b0a85a36e86d4f60 (plain)
1
2
3
4
5
6
7
8
9
10
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.