fork download
  1. % Function to compute the AWG given the diameter of the wire in inches
  2. function awg = in2awg(diameter)
  3. awg = log2(200 * diameter) / log2(92) - 36;
  4. end
  5.  
  6. % Function to compute the diameter of a wire (in inches) given the AWG value
  7. function diameter = awg2in(awg)
  8. diameter = 200 * (2^((awg + 36) / 39));
  9. end
  10.  
Success #stdin #stdout 0.12s 47336KB
stdin
0.01
stdout
Standard output is empty