summaryrefslogtreecommitdiff
path: root/215/CH9/EX9.4/ex9_4.sce
blob: 7b8316a0e1d2c8b349f735822a2843f8b61da500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
//Example 9.4
//Calculate settling time
t=0:0.1:5
ic=2*exp(-t)-4*exp(-t)
plot(t,ic)
xtitle('ic vs t','t in s','ic in A')
//Let ts be the settling time
//From the graph the maximum value is|-2|=2A
//'ts' is the time when ic has decreased to 0.02A
//On solving for 'ts'
ts=-log(0.02/4)
printf("ts=%3.2f s\n",ts)