## magnetic field simulator

version 1.0.0.0 (3.23 KB) by
computes the magnetic field induced by a given conductor geometry

Updated 09 Jan 2015

The function computes the magnetic field H induced by a given conductors geometry. The geometry is represented by straight conductors ("current sticks"). Theory of this numerical technique may be found in "Electromagnetic fields and Energy" by Hermann A. Haus, page 322.
Written by Prof. Yoash Levron, Technion, Israel, 2014.
FUNCTION INPUTS
The shape of conductors is represented by "current sticks". For example, a square conductor is represented by four sticks.
FROM - an array of vector points indicating where each current stick starts. FROM(i,:) is a raw vector (x,y,z), indicating a point in 3-D space. Units in meters [m]
TO - same as FROM. Indicating where each current stick ends.
CUR - Column Vector representing the current of each stick. CUR(i) is a scalar. Units in Amperes [A]
R - Observation points. An array of vector points in which the magnetic field is to be calculated. R(i,:) is a raw vector (x,y,z), indicating a point in 3-D space. Units in meters [m].

FUNCTION OUTPUT
Hmat - the magnetic field H at the observation points. Hmat(i,:) is a raw vector (Hx,Hy,Hz), indicating the magnetic field vector in Cartesian coordinates. Units are [A/m].

### Cite As

yoash levron (2021). magnetic field simulator (https://www.mathworks.com/matlabcentral/fileexchange/48990-magnetic-field-simulator), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2011a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux