Please send me an e-mail immediately if something is not clear about the homework, or you suspect there is a typo!
Feiyue Li, office MTH 4423, e-mail lify@math.umd.edu, office hours Mon Wed 1:00-2:00pm
You get 16 equations, expressing that the temperature at each of the 16 interior grid points is the arithmetic mean of the four neighboring gridpoints. The equations should look like this
u1 = (t1 + u2 + u5 + t4)/4
.
.
.
u16 = (u12 + t2 + t3 + u15)/4
You then put all the unknowns uj on the left hand side and get a linear system Au = b with a certain 16 by 16 matrix A, and a vector b of length 16.
Use surf(reshape(u,4,4)) where u is the solution
vector of length 16. This plots the temperature on the vertical axis over all
the interior gridpoints. To plot the temperature over all
gridpoints including the boundary you can use the following:
u1 = zeros(6,6); u1(:,1) = t1; u1(:,6) = t3; u1(1,:) = t4; u1(6,:) = t2; u1(2:5,2:5) = reshape(u,4,4); surf(u1)
rcond(A) which approximates
1/cond1(A).