function strucdem_helper(slide)
% STRUCDEM_HELPER  Draws pictures for STRUCDEM.

%   Copyright 1984-2002 The MathWorks, Inc. 
%   $Revision: 1.2 $  $Date: 2002/04/08 20:04:54 $

switch slide
case 1
   cla
   text(0.05,0.9,'patient');
   text(0.16,0.75, '.name');
   text(0.4,0.75,'John Doe') ;
   text(0.16,0.65,'.billing') ;
   text(0.4,0.65,'127.00') ;
   text(0.16,0.55,'.test') ;
   text(0.38,0.52,'  79   75   73') ;
   text(0.38,0.44,'180  178  177.5');
   text(0.38,0.36,'220  210  205')
   grid off
   box off
   set(gca,'xtick',[],'ytick',[],'xcolor','w','ycolor','w')
   hold on
   axis([0 1 0 1])
   plot([0.1 0.1],[0.85 0.55],'k-')
   plot([0.1 0.15],[0.75 0.75],'k-')
   plot([0.27 0.35],[0.75 0.75],'k-')
   plot([0.27 0.35],[0.65 0.65],'k-')
   plot([0.1 0.15],[0.65 0.65],'k-')
   plot([0.1 0.15],[0.55 0.55],'k-')
   plot([0.27 0.35],[0.55 0.55],'k-')
   x = [0.35 0.35 0.65 0.65 0.35];
   y = [0.58 0.32 0.32 0.58 0.58];
   plot(x,y,'k-')
   hold off

case 2
   cla
   text(0.8,1.3,'patient array')
   text(0.2,0.9,'patient(1)');
   text(0.15,0.65,'.name')
   text(0.51,0.65,''' John Doe''')
   text(0.15,0.55,'.billing')
   text(0.51,0.55, '127.00')
   text(0.15,0.45,'.test')
   text(0.5,0.42,'  79    75    73')
   text(0.494,0.32,'180  178  177.5')
   text(0.494,0.22,'220  210  205')
   grid off
   box off
   set(gca,'xtick',[],'ytick',[],'xcolor','w','ycolor','w')
   hold on
   axis([0 2 0 1.5])
   plot([1 1],[1.22 1.05],'k-')
   plot([0.22 1.22],[1.05 1.05],'k-')
   plot([0.22 0.22],[1.05 0.95],'k-')
   plot([1.22 1.22],[1.05 0.95],'k-')
   plot([0.1 0.1],[0.65 0.45],'k-')
   plot([0.22 0.22],[0.83 0.7],'k-')
   plot([0.1 0.15],[0.55 0.55],'k-')
   plot([0.1 0.15],[0.65 0.65],'k-')
   plot([0.37 0.47],[0.65 0.65],'k-')
   plot([0.37 0.47],[0.55 0.55],'k-')
   plot([0.1 0.15],[0.45 0.45],'k-')
   plot([0.3 0.47],[0.45 0.45],'k-')
   x = [0.47 0.47 1 1 0.47];
   y = [0.49 0.14 0.14 0.49 0.49];
   plot(x,y,'k-')
   
   text(1.2,0.9,'patient(2)');
   text(1.15,0.65,'.name')
   text(1.51,0.65,''' Ann Lane''')
   text(1.15,0.55,'.billing')
   text(1.51,0.55,'28.50')
   text(1.15,0.45,'.test')
   text(1.5,0.42,'  68   70   68')
   text(1.494,0.32,'118 118 119')
   text(1.494,0.22,'172 170 169')
   plot([1.1 1.1],[0.65 0.45],'k-')
   plot([1.22 1.22],[0.83 0.7],'k-')
   plot([1.1 1.15],[0.55 0.55],'k-')
   plot([1.1 1.15],[0.65 0.65],'k-')
   plot([1.37 1.47],[0.65 0.65],'k-')
   plot([1.37 1.47],[0.55 0.55],'k-')
   plot([1.1 1.15],[0.45 0.45],'k-')
   plot([1.3 1.47],[0.45 0.45],'k-')
   x = [1.47 1.47 1.93 1.93 1.47];
   y = [0.49 0.14 0.14 0.49 0.49];
   plot(x,y,'k-')
   hold off
   
case 3
   cla
   axis on
   axis([0 2 0 1])
   grid off
   box off
   set(gca,'xtick',[],'ytick',[],'xcolor','w','ycolor','w')
   text(0.75,0.93,'A');
   text(0.1,0.6,'.data')
   text(0.1,0.4,'.nest');
   text(0.4,0.4,'.testnum');
   text(0.4,0.3,'.xdata');
   text(0.4,0.2,'.ydata');
   text(0.74,0.4,' ''Test 1'' ');
   text(0.75,0.3,'[4 2 8]');
   text(0.75,0.2,'[7 1 6]');
   text(0.13,0.75,'A(1)');
   text(0.4,0.64,'3 4 7');
   text(0.4,0.56,'8 0 1');
   hold on
   plot([0.17 1.17],[0.85 0.85],'k-');
   plot([0.77 0.77],[0.9 0.85],'k-');
   plot([0.17 0.17],[0.85 0.77],'k-');
   plot([0.17 0.17],[0.72,0.65],'k-');
   plot([0.05 0.05],[0.6 0.4],'k-');                                                                                  plot([0.05 0.09],[0.6 0.6],'k-');
   plot([0.27 0.38],[0.6 0.6],'k-');                                                                                  plot([0.27 0.38],[0.4 0.4] ,'k-');
   plot([0.05 0.09],[0.4 0.4],'k-');
   plot([0.31 0.38],[0.3 0.3],'k-');
   plot([0.31 0.38],[0.2 0.2],'k-');
   plot([0.31 0.31],[0.4 0.2],'k-');
   plot([0.67 0.73],[0.4 0.4],'k-');
   plot([0.59 0.73],[0.3 0.3],'k-');
   plot([0.59 0.73],[0.2 0.2],'k-');                                                                                  plot([0.38 0.38 0.57 0.57 0.38],[0.68 0.52 0.52 0.68 0.68],'k-');
   text(1.1,0.6,'.data')
   text(1.1,0.4,'.nest');
   text(1.4,0.4,'.testnum');
   text(1.4,0.3,'.xdata');
   text(1.4,0.2,'.ydata');
   text(1.74,0.4,' ''Test 2'' ');
   text(1.75,0.3,'[3 4 2]');
   text(1.75,0.2,'[5 0 9]');
   text(1.13,0.75,'A(2)');
   text(1.4,0.64,'9 3 2');
   text(1.4,0.56,'7 6 5');
   plot([1.17 1.17],[0.85,0.77],'k-');
   plot([1.17 1.17],[0.72,0.65],'k-');
   plot([1.05 1.05],[0.6 0.4],'k-');                                                                                  plot([1.05 1.09],[0.6 0.6],'k-');
   plot([1.27 1.38],[0.6 0.6],'k-');                                                                                  plot([1.27 1.38],[0.4 0.4] ,'k-');
   plot([1.05 1.09],[0.4 0.4],'k-');
   plot([1.31 1.38],[0.3 0.3],'k-');
   plot([1.31 1.38],[0.2 0.2],'k-');
   plot([1.31 1.31],[0.4 0.2],'k-');
   plot([1.67 1.73],[0.4 0.4],'k-');
   plot([1.59 1.73],[0.3 0.3],'k-');
   plot([1.59 1.73],[0.2 0.2],'k-');
   plot([1.38 1.38 1.57 1.57 1.38],[0.68 0.52 0.52 0.68 0.68],'k-');
   
end