home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 3.ddi / DEMOS.DI$ / HINT.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  980 b   |  36 lines

  1. function hint
  2. %HINT    Puzzle hints.
  3. %    The command "hint" with no arguments gives a 
  4. %    little help with the answer to the current puzzle.
  5. %    You can also "type puzzle".
  6. %
  7. %    See also PUZZLE, MEMBRANE, GLOBAL.
  8.  
  9. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  10.  
  11. global HINTNUM
  12.  
  13. H = ['  .      U     e     zq     s  '
  14.      'p    ehn    la    p     re     '
  15.      'sg     b     la    ao     ln   '
  16.      'et    qs    .s     U      r    '
  17.      '   bg    )oi    ''c    a(    nl'''
  18.      'n    bl     o    sg     la    a'
  19.      '    shs    pr    c     ol     e'
  20.      '  m     ie     hp    pa    nl  '
  21.      '1  zz(l  e1zu  3)p/)  pu2(  zel'
  22.      '    e.    oc     s     U      s'
  23.      'x)sna   co1  /t =. n(Ux( ) eat '
  24.      '  eduaenisev hteloah teYrn. y'' '
  25.      'soe o l ,prtaroeiAn .htnhitephe'];
  26.  
  27. if (~exist('HINTNUM'))
  28.     error('You better use puzzle first.')
  29. end
  30. n = HINTNUM;
  31. k = size(H,2);
  32. [ignore,j] = sort(sin(n*n+(1:k)));
  33. disp(' ')
  34. disp(H(n,j));
  35. disp(' ')
  36.