Mathematical Modeling Lab
Introduction to Matlab


Matlab function for solving heat equation

Exercise

(please turn in, even though it won't be graded)

Modify the function hsolve.m to find an approximate solution to the Poisson equation: - laplacian(u) = f, on the unit square, where f is a given nxm matrix. Use the same boundary conditions as hsolve. Plot the solution obtained by your solver when f = zeros(64,64); f(32,32) = 1.