You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
example how to apply the universal(language independent) priciple of iteration to compute the Bx,By,Bz - components of a vectorfield for entries in a 3D grid representing (X,Y,Z ) cordinates of points in 3D space.
once you understand this principle you can easily compute fields in spherical or whatever coordinates as well and transform back to cartesian coordinates to plot the results
unfortunately matlab isn't the rigtht language if execution time is crucial
in this example the field is computed on a 10x10x10 - grid and the currentloop itself is additionally made up of 30 points where has to be iterated over for each entry in the grid ... altogther this takes several minutes
patience :)
The progress in percent is displayed in the command line
My implementation in C++ takes 0.008s to finish on the same machine
Cite As
Lucas Tassilo Scharbrodt (2026). magnetic field of a circuar current loop (https://se.mathworks.com/matlabcentral/fileexchange/68004-magnetic-field-of-a-circuar-current-loop), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (198 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
