rect_3d_b.m
PURPOSE:
This function generates B-field in carthesian 3-space [X] == [x,y,z]
produced by a uniform current density rectangle of dimensions [A] == [a,b,c]
contining uniform current in the +Z direction and carrying unit current I=1A.
The coordinate system is centered about the geometric center of rectangle.
Note: All Units are MKS (meters, Amps, Tesla)
SYNTAX:
[bx,by,bz]= rect_3d_b.m(x,y,z,a,b,c)
INPUT:
[x,y,z] == [X] vectors of coordinates, one point per row
[a,b,c] == [A] vectors of rectangle dimensions, one rectangle per row
Note: X and a should be the same size.
If A is a single row its rows are expanded to the rows of x
If X is a single row its rows are expanded to the rows of a
OUTPUT:
[bx,by,bz] == [B] vectors of B-fields at point corresponding to x & a
NOTE: Vectorized so can handle vectors of same length and scalers
NOTE: Produces double precision solution every where except eps from edges
CAUTION: Needs additional Validations at edge discontinuities (Part II)
Dependencies