summaryrefslogtreecommitdiff
path: root/1553/CH8/EX8.1/8Ex1.sce
blob: 98fc8ad4c2ed8d6ce01918e9293e3c97bf6d0a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//chapter 8 Ex 1

clc;
clear;
close;
//let rajeev's age be x
//by the given condition:  equation is x+15=5(x-5);
mycoeff=[-40 4];
p=poly(mycoeff,"x","coeff");
ageRajeev=roots(p);
mprintf("Present age of rajeev is %d years",ageRajeev);