blob: e04c0a8dbb2819e5a5bb4e8d3cee4c2812ed94b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Example 2.1
a1=%pi*2^2/4; // Relative area of wire-A
a2=%pi*1/4; // Relative area of wire-B
l1=1; // Relative lenght of wire-B
l2=4; // Relative lenght of wire-B
R1=5; // Resistance of wire
r=(l2/a2)/(l1/a1);
disp('The ratio of resistances (R2/R1) = '+string(r)+' ohm');
R2=r*R1;
disp('Resistance(R2) = '+string(R2)+' ohm');
// p 16 2.1
|