summaryrefslogtreecommitdiff
path: root/24/CH11/EX11.1/Example11_1.sce
blob: 3eee34e751eee5484ba7490c9601cd6e73407c6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//Given that
t = poly(0, 't')
A = -1.00-0.600*t+0.250*t^2

//Sample Problem 11-1a
printf("**Sample Problem 11-1a**\n")
Ts = [-3:0.5:6]
As = horner(A, Ts)
xset('window', 1)
xtitle( 'angular variable for the disk v/s time', 'time(sec)', 'Y-axis')
plot(Ts, As, 'm-o')

//Sample Problem 11-1b
printf("\n**Sample Problem 11-1b**\n")
To = roots(derivat(A))
printf("At t=%fsec, theta approaches its minimum value equal to %f\n", To, horner(A, To))

//Sample Problem 11-1c
printf("\n**Sample Problem 11-1c**\n")
Os = horner(derivat(A), Ts)
plot(Ts, Os, 'r-+')
legend('theta(rad)', 'omega(rad/s)')