(* ::Package:: *)

(*efield.m*)

(*Calculation of electric field from potenital*)
For[i=iini+1,i<=ilast-1,i++,
	For[j=jini+1,j<=jlast-1,j++,
		Ex[i,j]=-(V[i+1,j]-V[i-1,j])/(2*Deltax);
		Ey[i,j]=-(V[i,j+1]-V[i,j-1])/(2*Deltax);
		];
	];

tE=Table[
{Ex[i,j],Ey[i,j]},{i,iini+1,ilast-1},{j,jini+1,jlast-1}];
(*Print[Flatten[tEE]];*)
Print["ListVectorPlot[tE] of Electric Field"];
Print[ListVectorPlot[tE]];

Print["ListStramPlot[tE] of Electric Field"];
Print[ListStreamPlot[tE]]

Print["ListStreamDensityPlot[tE] of Electric Field"];
Print[ListStreamDensityPlot[tE]];

