summaryrefslogtreecommitdiff
path: root/2231/CH2/EX2.3/Ex_2_3.sce
blob: 473e3995fc836c96681a9bb2f1267f86f3b4bd37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Example 2_3
clc;
clear;close;

//Given data: 
Eb=55.5;//V
R=10;//ohm
//Vin=110*sin(omega*t);//V
Vm=110*sqrt(2);//V

//Solution :
omega_t=asind(Eb/Vm);//degree
Iavg=1/2/180*integrate('(Vm*sind(omega_t)-Eb)/R','omega_t',omega_t,180-omega_t);//A
disp(Iavg,"Average current in the circuit(A) : ");