//Example 22.4 B=1.50;//Magnetic field strength (T) l=5*10^-2;//Length of wire (m) I=20;//Current (A) theta=90;//Angle between I and B (deg) F=I*l*B*sind(theta);//Force (N) printf('Force on the wire = %0.2f N',F) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest