% Computes fields for multiple current loops.
 The loops are nominally in the yz-plane. You rotate them with the
 quaternion q(:,k) and translate the rotated coils with p(:,k).
 Rotation is done first and then translation of the coil center.

 If using this function to plot field lines you should arrange the coils
 so that the point [0;0;0] is in the center.

 When plotting field lines the accuracy of the computation will cause
 the field lines not to close. If the computation is continued, the
 field lines will spiral.

 Type  MagneticFieldCurrentLoop for a demo. It will plot the field
 vectors for two coaxial coils of different radii and different x
 positions and also the field lines.
   b = MagneticFieldCurrentLoop( i, a, p, q, x )

   i           (1,:)  Currents in each loop
   a           (1,:)  Loop radii
   p           (3,:)  Loop positions
   q           (4,:)  Loop quaternions from fixed to the loop frame
   x           (3,:)  Points at which to compute b
   d           (1,1)  Data structure
                      .nL     (1,1) Number of lines to plot
                      .nP     (1,1) Number of points per line

   b           (3,:)  Field (T)



Common: Graphics/NewFig
Common: Graphics/TitleS
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Common: Quaternion/QForm
Math: Analysis/Jacobian
Math: Linear/DupVect
Math: Linear/Mag
Math: Linear/Unit