summaryrefslogtreecommitdiff
path: root/215/CH14/EX14.7/ex14_7.sce
blob: 1d507103c77008fbe65bc703c657fa13de4f4aed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
//Example 14.7
//Install Symbolic toolbox
//Find the current through 5 ohm resistor
syms s
s=%s
//From figure 14.3
//Writing the KVL equation and taking the Laplace transform
I=1.5/(s*(s+2))+5/(s+2)
I1=1.5/(s*(s+2))
I2=5/(s+2)
I1p=pfss(I1)
i1=ilaplace(I1p(1))
i2=ilaplace(I1p(2)+I2)
i=i1+i2
disp(i,'i(t)=')