summaryrefslogtreecommitdiff
path: root/3648/CH20/EX20.2/Ex20_2.sce
blob: 28256eac1a78d1fd9837da8d892ff2f89db70240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Example 20_2
clc();
clear;
//To find the rms current in the circuit 
f=20       //Units in Hz
c=4*10^-7       //Units in F
xc=1/(2*%pi*f*c)         //Units in Ohms/sec
f=2*10^6        //Units in Hz
xc1=1/(2*%pi*f*c)         //Units in Ohms/sec
v=80         //Units in V
i=v/xc          //Units in A
i1=v/xc1          //Units in A
printf("The RMS current when f=20 Hz is=%.5f Ohms\nThe RMS current when f=2*10^6 Hz is=%.2f Ohms",i,i1)