summaryrefslogtreecommitdiff
path: root/1964/CH4/EX4.12
diff options
context:
space:
mode:
Diffstat (limited to '1964/CH4/EX4.12')
-rwxr-xr-x1964/CH4/EX4.12/ex4_12.sce29
1 files changed, 29 insertions, 0 deletions
diff --git a/1964/CH4/EX4.12/ex4_12.sce b/1964/CH4/EX4.12/ex4_12.sce
new file mode 100755
index 000000000..a11cd3052
--- /dev/null
+++ b/1964/CH4/EX4.12/ex4_12.sce
@@ -0,0 +1,29 @@
+//Chapter-4, Example 4.12, Page 138
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+Im=141.4;//instantaneous current
+f=50;//freq in hz
+w=2*%pi*f;//angular freq in rad/sec
+//instantaneous current equation is i=141.4*sin(w*t);
+function f=myfun(t)
+ f=Im*sin(w*t(1));
+endfunction
+t=[0.0025];
+g=numdiff(myfun,t)
+mprintf("rate of change of current is %d A/sec \n",g);
+function f1=myfun(t1)
+ f1=Im*sin(w*t1(1));
+endfunction
+t1=[0.005];
+g1=numdiff(myfun,t1)
+mprintf("rate of change of current is %d A/sec \n",g1);
+function f2=myfun(t2)
+ f2=Im*sin(w*t2(1));
+endfunction
+t2=[0.01];
+g2=numdiff(myfun,t2)
+mprintf("rate of change of current is %d A/sec \n",g2);
+//note:answer given in textbook for section c is wrong
+//=================================END OF PROGRAM==============================