summaryrefslogtreecommitdiff
path: root/1958/CH13/EX13.1/Chapter13_example1.sce
blob: c6bf8518f83895fc8c43b7439da728f6be76e24f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
//Input data
Vm=100//Maximum voltage in V
R=50//resitance in ohms

//Calculations
Vrms=(Vm/sqrt(2))//rms voltage in V
Irms=(Vrms/R)//rms current in A
Im=(Vm/R)//Maximum current in A

//Output
printf('rms current is %3.2f A and maximum current is %i A',Irms,Im)