summaryrefslogtreecommitdiff
path: root/3850/CH39/EX39.1/Ex39_1.sce
blob: ae298e3f73993bce8ddc13e3b232d65f0055281c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

//To Calculate the rms value of Current and time required to reach the Peak Value

//Example 39.1

clear;

clc;

i0=5;//Peak Value of Alternating Current in Amperes

Irms=i0/sqrt(2);//RMS Value of Alternating Current in Amperes

f=60;//Frequency of Alternating Current in Hz

T=1/f;//Time period of Alternating Current in seconds

t=T/4;//Time required to reach the Peak Value of Current in seconds

printf("RMS Value of the Alternating Current = %.1f A",Irms);

printf("\n Time required to reach the Peak Value of Current = %f s",t);