diff options
Diffstat (limited to '1445/CH2/EX2.1/ch2_ex_1.sce')
-rw-r--r-- | 1445/CH2/EX2.1/ch2_ex_1.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/1445/CH2/EX2.1/ch2_ex_1.sce b/1445/CH2/EX2.1/ch2_ex_1.sce new file mode 100644 index 000000000..2dbc6b6a2 --- /dev/null +++ b/1445/CH2/EX2.1/ch2_ex_1.sce @@ -0,0 +1,21 @@ +//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT +//Example 1 + +disp("CHAPTER 2"); +disp("EXAMPLE 1"); + +//SOLUTION + +//average value +v_av=(integrate('sin(x)','x',0,%pi))/(2*%pi); + +//rms value +v_rms=(integrate('sin(x)^2','x',0,%pi))/(2*%pi); +v_rms=sqrt(v_rms); + +ff=v_rms/v_av; +disp(sprintf("The form factor is %f",ff)); + +//END + + |