summaryrefslogtreecommitdiff
path: root/3890/CH1/EX1.1/EX1_1.sce
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 11:01:52 +0530
committerprashantsinalkar2018-02-03 11:01:52 +0530
commit7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch)
tree449d555969bfd7befe906877abab098c6e63a0e8 /3890/CH1/EX1.1/EX1_1.sce
parentd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff)
downloadScilab-TBC-Uploads-master.tar.gz
Scilab-TBC-Uploads-master.tar.bz2
Scilab-TBC-Uploads-master.zip
Added new codeHEADmaster
Diffstat (limited to '3890/CH1/EX1.1/EX1_1.sce')
-rw-r--r--3890/CH1/EX1.1/EX1_1.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/3890/CH1/EX1.1/EX1_1.sce b/3890/CH1/EX1.1/EX1_1.sce
new file mode 100644
index 000000000..6e29f6d17
--- /dev/null
+++ b/3890/CH1/EX1.1/EX1_1.sce
@@ -0,0 +1,20 @@
+//Electric machines and power systems by Syed A Nasar
+//Publisher:Tata McGraw Hill
+//Year: 2002 ; Edition - 7
+//Example 1.1
+//Scilab Version : 6.0.0 ; OS : Windows
+
+clc;
+clear;
+
+pi=900; //input power during on period in watts
+ton=20; //on period in minutes
+toff=40; //off period in minutes
+
+E=(pi*ton*60+0*toff*60); //energy consumed per hour in w s
+p_av=E/(60*60); //the average power in watts
+
+printf('the energy consumed per hour is %d in w-s\n',E)
+printf('the average power is %d in watts\n',p_av)
+
+