Magnetic field of coils

Profiles the magnetic field along a selectable curve for a helical (solenoidal or toroidal) current loop using the Biot-Savart law.

217 Downloads

Updated 27 Jul 2022

View License

Profiles the magnetic field along a selectable curve for a helical (solenoidal or toroidal) current loop using the Biot-Savart law. The Biot-Savart line integral is represented first symbolically in terms of a parametric path in three dimensions, then converted to a function of the parameter and integrated numerically. The results are compared to analytic results for an ideal solenoid or toroid.

Cite As

Duncan Carlsmith (2023). Magnetic field of coils (/matlabcentral/fileexchange/107874-magnetic-field-of-coils), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

MagneticFieldOfCoils

Version Published Release Notes
1.0.4

Spell check

1.0.3

Minor fix.

1.0.2

Added comparison of finite solenoidal coil axial field to ideal.

1.0.1

Minor fixes for single turn helices.

1.0.0