summaryrefslogtreecommitdiff
path: root/1430/CH13/EX13.5/exa13_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '1430/CH13/EX13.5/exa13_5.sce')
-rw-r--r--1430/CH13/EX13.5/exa13_5.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/1430/CH13/EX13.5/exa13_5.sce b/1430/CH13/EX13.5/exa13_5.sce
new file mode 100644
index 000000000..70ab20b30
--- /dev/null
+++ b/1430/CH13/EX13.5/exa13_5.sce
@@ -0,0 +1,24 @@
+// Example 13.5
+// Inversion of a Third-order Function
+R=12;
+L=1;
+C=1/20;
+I_1=-2;
+I_2=2;
+s=%s;
+num=I_1*s^2+(R/L)*I_1*s+I_2/(L*C);
+den=s*(s^2+(R/L)*s+1/(L*C));
+I_s=num/den;
+pfe=pfss(I_s);
+// From partial fraction expansion
+A_1=2;
+A_2=-5;
+A_3=1;
+s=roots(den);
+// Taking the inverse Laplace transform we get
+t=0:0.001:10
+i=2*exp(s(3)*t)+A_2*exp(s(2)*t)+A_3*exp(s(1)*t)
+plot(t,i)
+xlabel('t')
+ylabel('i(t)')
+title('Current Waveform')