blob: f9da5dc55d8eebd3c379de80b2715a194905d538 (
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
|
//To Calculate the Potential Difference and Thermal Energy
//Example 32.5
clear;
clc;
V=2.0;//Emf of battery in Volts
i=0.100;//Current in Amperes
r=0.50;//Resistance in ohms
Vab=V-i*r;//Potential difference across the terminals
printf("(a) Potential difference across the terminals= %f V",Vab);
t=10;//Time in seconds
U=i^2*r*t;//Formula for finding the thermal energy developed in the battery
printf("\n(b) Thermal energy developed in the battery is= %.2f J",U);
|