summaryrefslogtreecommitdiff
path: root/3754/CH3/EX3.7/3_7.sce
blob: d0e98d961f20b393099d5f16095c78622ff5cf14 (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
34
35
36
clear//

//Case 1:

//Variables

w = 0.01              //width (in meter)
h = 0.01              //height (in meter)
l = 0.50              //length (in meter)
p = 3.5 * 10**-5      //Resistivity (in ohm-meter)

//Calculation

A = w * h             //Area of cross section (in metersquare)
R = p*l/A             //Resistance (in ohm)

//Result 1:

printf("\n Resistance in case 1 is :  %0.3f  ohm.",R)

//Case 2:

//Variables

w = 0.50              //width (in meter)
h = 0.01              //height (in meter)
l = 0.01              //length (in meter)

//Calculation

A = w * h             //Area of cross section (in metersquare)
R = p*l/A             //Resistance (in ohm-meter)

//Result

printf("\n Resistance in case 2 is:  %0.3f  ohm.",R)