summaryrefslogtreecommitdiff
path: root/3809/CH7/EX7.1/EX7_1.sce
blob: a79df19fbd45e0e9bb2452a8f6680ca021dfe5d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//Chapter 7, Example 7.1

clc
//Initialisation'
v=50                                  //voltage
i=5                                   //current
phi=30                                //angle in degree
pi=3.14                               //pi

//Calculation
s=v*i                                  //apparent power
p=cos(phi*3.14/180)                              //power factor
ap=s*p                                  //active power

//Results
printf("(a) Apparent Power, S = %d VA\n",s)
printf("(b) Power Factor = %.3f Degree\n",p)           //wrong answer in textbook
printf("(c) Active Power, P = %.1f W\n",ap)          //wrong answer in textbook