summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.1/ch2_ex_1.sce
blob: 2dbc6b6a23e24b761d571a108a38006900e062a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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