summaryrefslogtreecommitdiff
path: root/2459/CH1/EX1.1/Ex1_1.sce
blob: 78551dda3392dffcccb2df0b31879b8e67ff2c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//chapter 1
//example 1.1
//page8

Eg=24 // V
Ri=.01 // ohm
P=100 // W

I=P/Eg // we know that P=Eg*I since for ideal source, V is equivalent to Eg
Vi=I*Ri
V=Eg-(I*Ri)

printf("voltage drop in internal resistance = %.3f V \n",Vi)
printf("terminal voltage = %.3f V",V)