view[f_, n_]:=Module[{lo, hi, m},
		m = Table[
                  N[f[i/(n + 1), j/(n + 1)]], {i, 1, n}, {j, 1, n}]
                  ;
		lo = Apply[Min, m];
		hi = Apply[Max, m];
		Print["{ ", lo, " , ", hi, " }"];
		hi = Min[hi, 2];
		Plot3D[m[[Round[i], Round[j]]], {i,  1, n}, {j, 1, n},PlotPoints -> n,PlotRange  -> {lo, hi}];
	];

explicit[n_, a_, f_, g_, h_]:=Module[{m},
		\(m = N[Table[
				
                  If[i == 1, g[j - 1], 
					
                    If[i == n + 2, h[j - 1], 
						
                      If[j == 1, f[i - 1], 0.0]]], {i, 1, n + 2}, {j, 1, 
                    n + 2}]]\);
		\(For[j = 2, j <= n + 2, j = j + 1, 
			
              For[i = 2, i <= n + 1, i = i + 1, 
				
                m[\([i, j]\)] = 
                  a \((m[\([i - 1, j - 1]\)] + m[\([i + 1, j - 1]\)])\) + 
                    \((1 - 2  a)\) m[\([i, j - 1]\)]
			]]\);
		Plot3D[m[[Round[i], Round[j]]], {i, 1, n + 2},{j, 1, n + 2},PlotPoints -> n + 2];
		]

\(n = 20; 
f[i_] := Max[0.0, n/3 - Abs[i - n/2]]; 
g[j_] := 0.0; 

    h[j_] := 0.0; \)

explicit[n, 0.45, f, g, h]

explicit[n, 0.5, f, g, h]

explicit[n, 0.55, f, g, h]