% Example session for the use of tofour:
% (cut and paste or 
%   see http://www.math.hut.fi/teaching/osdylask/tofourex.gif   )
%
% Mat-1.174 Computational ODEs,  (c) jan von pfaler,  April 97



% Let 'peruskolmio.m' be a script-file consisting of the following 3 lines:

  p = [ 0,0; 1,0; .5,1/sqrt(2)]';
  t = [1;2;3;1];  
  e = [1,2,3; 2,3,1; 0,0,0; 1,1,1; 1,1,1; 1,1,1; 1,2,3];

  pdeplot(p,e,t)
  n=4;
  figure(1);  clg;
  for i=1:n; 
    if i~=1, [p,e,t]=tofour(p,e,t); end
  figure(2);floor(sqrt(n)); subplot(ans,ceil(n/ans),i)
  pdeplot(p,e,t); 
  figure(3);floor(sqrt(n)); subplot(ans,ceil(n/ans),i)
  [k,m,f]=assema(p,t,1,1,1); spy(k)
  end

