summaryrefslogtreecommitdiff
path: root/1430/CH9/EX9.1/exa9_1.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1430/CH9/EX9.1/exa9_1.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '1430/CH9/EX9.1/exa9_1.sce')
-rw-r--r--1430/CH9/EX9.1/exa9_1.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/1430/CH9/EX9.1/exa9_1.sce b/1430/CH9/EX9.1/exa9_1.sce
new file mode 100644
index 000000000..5e11a0e9d
--- /dev/null
+++ b/1430/CH9/EX9.1/exa9_1.sce
@@ -0,0 +1,25 @@
+// Example 9.1
+// Zero-Input Response of an RL circuit
+// From figure 9.5
+L=60*10^-3;
+R_eq=40+10;// Equivalent resistance
+tau=L/R_eq; // Time constant
+// Let us denote y(0^-) by y_bef and y(0^+) by y_aft
+i_bef= 25/10; // t<0 , under steady state conditions
+// form the continuity equation of inductor current we get
+i_aft=i_bef;
+v_bef=25;
+t=0:0.0001:0.01;
+i=i_aft*%e^(-t/tau); // t>0
+v=-40*i; // t>0
+subplot(2,1,1)
+plot(t,i,'r');
+xlabel('t')
+ylabel('i(t)')
+title('Current Waveform of inductor')
+subplot(2,1,2)
+plot(t,v,'-g')
+xlabel('t')
+ylabel('v(t)')
+title('Voltage Waveform across 40-Ohm resistance')
+