1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Drawing field lines with MATLAB

  1. Apr 26, 2011 #1
    1. The problem statement, all variables and given/known data
    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

    2. Relevant equations

    3. 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...

    Attached Files:

    • 12.jpg
      File size:
      13.6 KB
  2. jcsd
  3. Apr 27, 2011 #2
    Investigate the function 'quiver3'. However, I am not sure if it accepts any other coordinate system other than cartesian.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Drawing field lines with MATLAB