blob: 87c01644a14b726f33df471cb4ca42596270c4dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Chapter 6, Example 6.4
clc
//Initialisation
w=25 //angular frequency
C=10*10**-3 //capacitance in farad
Ic=2 //current in ampere
//Calculation
Xc=1/(w*C) //Capacitive Reactance
Vc=Ic*Xc //voltage across capacitor
//Results
printf("Voltage, V = %d V r.m.s",Vc)
|