summaryrefslogtreecommitdiff
path: root/3875/CH1/EX1.4/Ex1_4.sce
blob: d5698999388ddb0674b9b020a5b0b5854f543252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc;
clear;
omega=500 //frequency in radian/s
L=0.08 //inductance in H
R=15 //resistance in ohm
C=30*10^-6 //capacity in F

//calculation

L_omega=L*omega //in ohm
C_omega=1/(C*omega) //in ohm 
tan_phi=(L_omega-C_omega)/R //in degrees
phi=atand(tan_phi)

mprintf("The current leads the applied voltage by = %2.2f degree",-phi)
//The answers vary due to round off error