I want to implement the magnetic field around a 3D dipole in z direction in MATLAB and look at it slice by slice in all three directions. I have got an expression from internet which is ((mu)/r^3)*(3(z^2/r^2)-1). But it looks like an expression in 2-D space,whereas I am looking for an expression in 3D space.

And as per my knowledge, the 2D contour plot should be similar in yz and zx plane and the plot in xy plane look like a circle.Or am I missing a point here?

Attached are the plots obtained from the above expression. Also, the origin of the dipole in k-space is another issue. Right now I have set it at the centre of the dipole. I am not sure if it is right. Please help if someone has more expertise in this.

Thanks,

Guru

Similar questions and discussions