summaryrefslogtreecommitdiff
path: root/1268/CH4/EX4.9/4_9.sce
blob: 1bb51ed61f116e8fbdec40e3db70742ef6dae192 (plain)
1
2
3
4
5
6
7
8
9
10
11
clc;
disp("Example 4.9")
// Here the required ratio in terms of n is 2n^2/((n+1)(2*n+1))
// and the value of this ratio is 0.817
// solving this we get the following quadratic equation
// 0.366n^2-2.451n-0.817=0
y=[0.366 -2.451 -0.817]
z=roots(y)
// z is a matrix that has the roots of the equation
//since we need the positive value of n
disp(z(1,1))