summaryrefslogtreecommitdiff
path: root/656/CH1/EX1.4/example1_4.sce
blob: 7e5b321c14231f1c6d2bbef7bc8bc0027c237559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// i be the current in amperes i=2A
 
// it flows for time t=10s
 
// q be the total charge given  by q=i*t
 
i=2;
 
t=10;
 
q=i*t;

// total charge is 20 coulombs
 
// energy is 2.3KJ ( kilo joules)
 
w=2.3*10^3; 
 
// voltage drop v in volts  given by= v=w/q
 
v=w/q;

disp("v=")
disp(v)
units='Volts V'
v=[string(v) units];
disp(v)
// in volts V


 
// voltage drop is 115v