From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2297/CH2/EX2.8/Ex2_8.sce | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 2297/CH2/EX2.8/Ex2_8.sce (limited to '2297/CH2/EX2.8/Ex2_8.sce') diff --git a/2297/CH2/EX2.8/Ex2_8.sce b/2297/CH2/EX2.8/Ex2_8.sce new file mode 100755 index 000000000..e6b47b2a7 --- /dev/null +++ b/2297/CH2/EX2.8/Ex2_8.sce @@ -0,0 +1,19 @@ +// Example 2.8:equation of current and time +clc; +close; +clear; +format('v',6) +// given : +v=100;//voltage in volts +r=100;//resistance in ohms +l=0.2;//inductance in henrty +T=1/(l/r);//calculating time in seconds +t=500;//time in micro seconds +i1=1-exp(-T*t*10^-6);//current in amperes +disp(i1,"current is (when t=500 micro seconds),(A)=") +v2=50;//voltage in volts +x=v2/r;//variab;e +x1=x*((v2/r)+i1);//variable +t1=t+(10^6*(x1/500));//time in seconds +disp(ceil(t1),"time at which current will be zero is,(micro-seconds)=") +//time is caluclated wrong in the textbook as they had not added the values -- cgit