blob: ee14849955854a65383c1a42944848d4f12289c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Chapter 6, Example 6.2
clc
//Initialisation
pi=3.14 //pi
f=50 //frequency in hertz
C=2*10**-6 //capacitance in farad
//Calculation
w=2*pi*f //angular frequency
Xc=1/(w*C) //Capacitive Reactance
//Results
printf("Reactance, Xc = %.2f KOhm",Xc/1000)
|