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

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/of...oopoffaxis.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
 Recognitions: Science Advisor Just use $$r=\sqrt{x^2 + y^2}$$.
 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?

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

The conversion between cylindrical and Cartesian components goes like

This is from
http://www.engin.brown.edu/courses/e.../Vectors6a.htm

 Tags cartesian, current loop, magnetic field, matlab