magnetic field simulator
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 (2025). magnetic field simulator (https://www.mathworks.com/matlabcentral/fileexchange/48990-magnetic-field-simulator), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |