Sample code 5.1.1. Jacobi relaxation method to solve 2D Laplace equation.

SetDirectory["C:\\Users\\Yoon\\Documents\\teaching\\ZCE111\\1011SEM2\\notes\\lecture5\\2D"];(*The "SetDirectory" line has to be modified to point to your directory,if you are to run it in your own PC*)
<<initialisation.m;

(*Iterate for ntlast times*)(*Loop will break either
tol is met or n>ntlast*)

<<update.m;
<<efield.m;
(*
ntlast=3000;
For[nt=1,nt≤ntlast,nt++,
<<update.m;
];
*)