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

//Given data: 
Vo=50;//V
R=10;//ohm
//Vin=100*sin(omega*t);//V
Vm=100;//V

//Solution :
omega_t=asin(Vo/Vm);//radian
Iavg=1/2/%pi*integrate('(Vm*sin(omega_t)-Vo)/R','omega_t',omega_t,omega_t+2*%pi/3);//A
disp(Iavg,"Average current in the circuit(A) : ");