filr_3d_b.m
PURPOSE:
Generates B-field in carthesian 3-space [X] == [x,y,z] from straight filament
Filament has finite radius [d] and length [c] in z direction.
Inside r<d the field is proportional to r rather than 1/r for filament.
Filament has uniform current density and carries unit current (I=1A)
in the +z direction.
The coordinate system is centered about the geometric center of filament.
Note: All Units are MKS (meters, Amps, Tesla)
SYNTAX:
[bx,by,bz]= filr_3d_b(x,y,z,c,d)
INPUT:
[x,y,z] == [X] vectors of coordinates, one point per row
[c] == vector of filament lengths one filament per row
[d] == vector of filament radius one filament per row
Note: If x,y,z & c,d are matrix or vectors they must be same size.
Any of the components can be a scalar.
OUTPUT:
[bx,by,bz] == [B] vectors of B-fields at point X
NOTE: use fil_3b_b if [X] is outside filament for faster execution
Dependencies