PREVIOUS: Course Outline | UP: Course Outline | NEXT: Field lines and equipotentials |
nq = 2 q1 = 1.e-6, x1 = -1, y1 = 0 q2 = -1.e-6, x2 = 1, y2 = 0Write your program using arrays to store the charges and their positions, so that the number of charges can be easily modified. Plot phi and Ex as functions of y for -10 < y < 10 in steps of 0.1. Here's a simple script that illustrates some basic graphics. [Solution]