Calculation of the magnetic field produced at any point by a conductor that is not a straight line is complex. MATLAB computer programs are developed to model the magnetic field produced by the current paths of any shape. The path is divided into a series of small straight-line segments. One program determines the magnitude and direction of the magnetic field produced by the conductor at any specified point. A second program displays the surface plot of the magnetic field at the specified height. The outputs of the programs are verified by laboratory measurements and comparison to situations for which analytical solutions exist. Assessing the magnetic fields produced by a cable when the current and geometry of the path are known is straightforward using the programs.