blob: aedb74797e5547694c2ae22c656086acbd78a73b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
v=300;
c=500*10^(-6);
r1=4*10^3;
r2=10;
disp("Part a");
t1=5*r1*c;
disp("time taken (in s) to fully charge is"); disp(t1);
disp("Part b");
i1=v/r1;
disp("the peak charging current (in mA) is"); disp(i1*10^3);
disp("Part c");
t2=5*r2*c;
disp("time taken (n ms) to fully discharge is"); disp(t2*10^3);
disp("Part d");
i2=v/r2;
disp("peak discharging current (in A) is"); disp(i2);
disp("Part e");
w=0.5*c*v^2;
disp("energy stored (in J) is"); disp(w);
disp("Part f");
p=w/t2;
disp("average power produced (in W) by the lamp is"); disp(p);
|