diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /293/CH2/EX2.5/eg2_5.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '293/CH2/EX2.5/eg2_5.sce')
-rwxr-xr-x | 293/CH2/EX2.5/eg2_5.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/293/CH2/EX2.5/eg2_5.sce b/293/CH2/EX2.5/eg2_5.sce new file mode 100755 index 000000000..f1659edde --- /dev/null +++ b/293/CH2/EX2.5/eg2_5.sce @@ -0,0 +1,22 @@ +L = 0.1; // inductance of the coil in henry
+t1 = [0:0.001:0.1];
+t2 = [0.101:0.001:0.3];
+t3 = [0.301:0.001:0.6];
+t4 = [0.601:0.001:0.7];
+t5 = [0.701:0.001:0.9]
+//current variation as a function of time
+i1 = 100*t1;
+i2 = (-50*t2) + 15;
+i3 = -100*sin(%pi*(t3-0.3)/0.3);
+i4 = (100*t4) - 60;
+i5 = (-50*t5) + 45;
+
+t = [t1,t2,t3,t4,t5];
+i = [i1,i2,i3,i4,i5];
+plot(t, i)
+
+dt = 0.001;
+di = diff(i);
+V = L*di/dt; //voltage drop appearing across the inductor terminals
+Tv = [0:0.001:0.899];
+plot(Tv, V, "green")
\ No newline at end of file |