Using the MATLAB PDE TOOLBOX
The MATLAB PDE Toolbox is a tool for solving two-dimensional linear partial differential equations by finite element methods. This document is intended to guide you through the use of the graphical user interface for interactive use. It assumes that the reader is running MATLAB and the PDE toolbox in a graphical environment.
At the MATLAB prompt, type pdetool. You should see a window like the one below pop up.
We will work through the solution of Laplace's equation with Dirichlet boundary conditions. Solutions of Laplace's equation, called harmonic functions, describe situations in which forces are balanced, as might occur in electrostatics or thermal equilibria. This is an example which might be first encountered in an elementary PDE course, and which you might solve by Fourier series methods, by hand; you will find that you obtain the solution faster with the PDE Toolbox, and that you also obtain a visual representation, which may contribute to the more important goal of understanding. We will then modify the example, to one which might not be so easily done by hand.
1.Draw the region of interest: suppose we want the rectangle (x,y) = [0, 3] X [0, 1].
o In the Options menu, select Grid and Snap; then set the Axes' Limits to [-1 4] and [-1 2]. When finished, click Apply and Close the Axes' Limits window.