main.m795 chars28 lines
This MATLAB code calculates and plots the magnetic field generated by a 1A current through a coil with 10 turns. The coil is assumed to have a radius of 0.5 meters and the magnetic field is visualized using quiver3.
gistlibby LogSnag