I want to plot the equipotential lines of an electrical dipole in MATLAB, but not with using contours. I need an algorithm, please help to do.
\[\ast\]
Do you mean plotting a curve on a plane surface of the a given potential over a an area?
@gleem the exact problem is: we have two point charge, Q1=30 and Q2=-30 mu Colone. the position of Q1 is (1.5, 0) and the position of Q2 is (-1.5, 0). plot the potential line and equipotential lines of this system in MATLAB.
You have the equation for the potential of the field . Set a value for V and various theta and plot the equation for corresponding r. You can also find an equation for the field magnitude and do the same. Set E and theta and solve for r.
If you can read the Mathematica code, then you can use the demonstration: http://demonstrations.wolfram.com/LinesOfForceForTwoPointCharges/ in order to design a similar solution in Matlab.
where is Mathematica Code for this simulation?
You can download the demonstration in the webpage ealier mentioned, then you can open the demonstration notebook with the Mathematica program (the file that contains the demonstration) an read the written code (possibly you will have to expand the labels). There is also a CDF player, but I don't know if it lets you read the code. The Mathematica software or its demo lets read the code.
Join our real-time social learning platform and learn together with your friends!