%% This script assumes that the mesh and the solution
%% have been exported from the pdetool GUI.
%% They are thu in the arrays p,e,t and u in the usual fashion.
%% It also assumes the exact solution to be in the function exact.m.

xc=p(1,:)'; yc=p(2,:)';
uex=exact(xc,yc);

subplot(1,2,1), 
  plot3(xc,yc,u,'ro'); 
  xlabel('x'); ylabel('y');
  title('pdetool');
subplot(1,2,2), 
  plot3(xc,yc,uex,'bo');  
  xlabel('x'); ylabel('y');
  title('exact');

error=(max(abs(u-uex)))
