blob: 68fa3326f7176caf39c24b4f844b79a2697830e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
clc
//Example 7.7
printf("Given")
disp('i=12*sin(%pi*t/6),R=0.1 ohm,L=3H')
t=0:.1:6
i=12*sin(%pi*t/6),R=0.1;L=3;
//Let wL be the energy stored in the inductor
wL=0.5*L*i^2
plot(t,wL)
//From the above graph
wLmax=216;tmax=3;
printf("Maximum value at %d J at %d sec",wLmax,tmax)
//Let pR be the power dissipated in the resistor
pR=i^2*R
//Energy converted to heat in 6 sec interval in the resistor is
syms s
wR=integ(14.4*(sin(%pi/6*s))^2,s,0,6)
disp(wR,'wR')
|