Drawing field lines with MATLAB

AI Thread Summary
The discussion focuses on calculating the electric field of a uniformly charged half spherical shell and plotting the results in MATLAB. The electric field has been determined for regions z > R and z < R, fulfilling part a of the homework. The user is now seeking guidance on how to visualize the electric field and equipotential lines in MATLAB, expressing uncertainty due to limited experience with the software. They note that equipotential lines are perpendicular to electric field lines and consider using the 'quiver3' function for plotting. Clarification on coordinate systems compatible with 'quiver3' is also requested.
Minakami
Messages
4
Reaction score
0

Homework Statement


Consider a uniformly charged half spherical shell. The total charge is Q and the radius is R.

a) Calculate the electric field as a function of z for – 5R < z < 5R.
b) Draw equipotential curves in the xz-plane for – 5R < x, z < 5R with at least 8 equallyspaced
curves.



Homework Equations





The Attempt at a Solution


I solved for the electric fields in the region z>R and z<R so part a) is done.
I'm trying to plot this field and the equipotential lines in MATLAB but I couldn't figure out how. I haven't really used MATLAB before but I think MATLAB can definitely do this.
I understand that the equipotential lines are perpendicular to the electric field lines. So maybe I can use this fact to draw the equipotential lines...
 

Attachments

  • 12.jpg
    12.jpg
    9.1 KB · Views: 654
Physics news on Phys.org
Investigate the function 'quiver3'. However, I am not sure if it accepts any other coordinate system other than cartesian.
 
Back
Top