# Cartesian equation for the Magnetic field resulting from a single current loop?

#### kilianod5150

Hello

I am carrying out some analysis on the magnetic field generated over a 3D region by a single current loop. The present form of the equations is in cylindrical coordinates and is as follows
$$\vec{B}$$={Brc,0,Bz}
There is no angular component in this present from.
Note: The following website contains the formulas in question:
http://www.netdenizen.com/emagnet/offaxis/iloopoffaxis.htm

My question is as follows. How could one convert a complex cylindrical equation such as this to Cartesian coordinates? The main aim of this is to plot the fields in Matlab, if the equations were in cartesian form it would simply greatly my analysis.

The main problem I seem to encounter is that since there is no angle component, using conversions such as x=r*cos(theta) and y=r*sin(theta) do n0t seem to make sense as it would imply that there is only an x component and no y component.

I tried using Mathematica to convert the equations using the ConvertToCartesian command to no avail.

Any help with this problem would be greatly appreciated.

Regards

Kilian

#### clem

Just use $$r=\sqrt{x^2 + y^2}$$.

#### kilianod5150

Thanks for the reply, I had thought of using that but i still have the problem where there is no y component of the magnetic field.
In other words converting B(rc,phi,z)=(Brc(rc,theta,z),0,Bz(rc,theta,z)) would result in B(x,y,z)=(Bx(x,y,z),0,Bz(x,y,z)). The By(x,y,z) component is zero, is this correct? Or is there a way to expand the rc unit vector into x and y parts?

#### dgOnPhys

Last edited by a moderator:

### The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving