Magnetic field representation in Octave

Click For Summary
SUMMARY

The discussion focuses on representing magnetic field lines around a long wire carrying an electric current using Octave's quiver function. The magnetic field is derived from Ampere's law, which states that the magnetic field around an infinitely long straight wire is circular. The user attempted to visualize this in Octave but expressed uncertainty about the accuracy of their representation, suspecting that the lines should be circular rather than linear. The key takeaway is the necessity of correctly applying Ampere's law to achieve an accurate representation of magnetic field lines.

PREREQUISITES
  • Understanding of Ampere's law and its application in electromagnetism
  • Familiarity with Octave programming and the quiver function
  • Knowledge of magnetic field concepts and their graphical representations
  • Basic skills in mathematical modeling of physical phenomena
NEXT STEPS
  • Research the mathematical derivation of magnetic fields using Ampere's law
  • Learn how to use the quiver function in Octave for vector field visualization
  • Study the properties of magnetic field lines and their characteristics
  • Explore examples of magnetic field representations in Octave or MATLAB
USEFUL FOR

Students in physics or engineering, Octave users interested in electromagnetism, and anyone looking to visualize magnetic fields accurately.

Miss_Fire
Messages
4
Reaction score
0

Homework Statement


I need to represent in Octave (using the quiver function) the magnetic field lines around a long wire which carries an electric current around the wire. The magnetic field of an infinitely long straight wire can be obtained by applying Ampere's law.

Homework Equations


The expression for the magnetic field is:
groapa8.png


The Attempt at a Solution


I wrote a program in Octave and I obtained the folowing figure using the formula:
11846305_818013438314755_500729020_n.jpg


I'm almost sure that these couldn't be magnetic field lines, because I read somewhere that they must be circular. Any help would be much appreciated[/B]
 
Physics news on Phys.org
Pay closer attention to the representation.
 

Similar threads

Replies
14
Views
3K
Replies
16
Views
2K
Replies
2
Views
1K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K