summaryrefslogtreecommitdiff
path: root/1958/CH13/EX13.4/Chapter13_example4.sce
blob: 7ddbf515e13c2331f93a57f7592824513767bc5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
clear
//Input data
Vm=220//Maximum voltage in V
f=50//frequency in Hz
R=2000//Resistance in ohms
C=5*10^-6//Capacitor in F

//Calculations
Xc=(1/(2*3.14*f*C))//Reactance in ohms
Z=sqrt(R^2+Xc^2)//Impedence in ohm
Vc=(Vm*Xc)/Z//Maximum potential difference across the capacitor in V

//Output
printf('Maximum potential difference across the capacitor is %3.2f V',Vc)