blob: 2ea36409a31028a949c96606c65efc92e6c96156 (
plain)
1
2
3
4
5
6
7
8
|
//1 inches = 0.0254meters
//1 foot = 0.3048 meters
d = 0.1*0.0254; // diameter of the wire in meters
L = 10*0.3048; //length of the wire in meters
rho = 1.724*10^-8; // resistivity of the wire in ohm-meter
A = %pi*(d/2)^2; // cross sectional area of the wire
R = rho*L/A; //resistance of the wire in ohm
disp(R,"resistance of the wire (in ohm)=")
|