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 --- 1445/CH2/EX2.31/Ex2_31.sce | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 1445/CH2/EX2.31/Ex2_31.sce (limited to '1445/CH2/EX2.31/Ex2_31.sce') 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 + -- cgit