//Example 22.6 B=2*5*10^-5;//Magnetic field strength (twice that of Earth's) (T) r=5*10^-2;//Distance (m) mu_0=4*%pi*10^-7;//Permeability of free space (T.m/A) I=2*%pi*r*B/mu_0;//Current (A) printf('Current in the wire = %0.1f A',I) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest