summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.31
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1445/CH2/EX2.31
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1445/CH2/EX2.31')
-rw-r--r--1445/CH2/EX2.31/Ex2_31.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/1445/CH2/EX2.31/Ex2_31.sce b/1445/CH2/EX2.31/Ex2_31.sce
new file mode 100644
index 000000000..870c20204
--- /dev/null
+++ b/1445/CH2/EX2.31/Ex2_31.sce
@@ -0,0 +1,21 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 31 // read it as example 30 in the book on page 2.84
+
+disp("CHAPTER 2");
+disp("EXAMPLE 31");
+
+//VARIABLE INITIALIZATION
+//function of the waveform is deduced to be y=10+10.t/T
+//SOLUTION
+//Yav=(1/T).Integral(ydt) from 0 to T
+//say
+T=1; // 1 sec
+Yav=(1/T)*integrate('(10+10*t/T)', 't', 0, 1);
+disp(sprintf("The average value of waveform is %.0f", Yav));
+//RMS value Yrms=(1/T).Integral(y^2.dt) from 0 to T
+Yms=(1/T)*integrate('(10+10*t/T)^2', 't', 0, 1);
+disp(sprintf("The RMS value of waveform is %.2f", sqrt(Yms)));
+disp(" ");
+//
+//END
+