clear all; clc;

q = 15e-6; %charge
x=0; y=0; z=2;
x1=1; y1=1; z1=0; %q1 location
x2=1; y2=-1; z2 =0; %q2 location
x3=-1; y3=1; z3=0; %q3 location
x4=-1; y4=-1; z4=0; %q4 location

E1 = coulomb(1,x,y,z,x1,y1,z1);
E2 = coulomb(1,x,y,z,x2,y2,z2);
E3 = coulomb(1,x,y,z,x3,y3,z3);
E4 = coulomb(1,x,y,z,x4,y4,z4);

E = E1 + E2 + E3 + E4

