home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / GENERAL.DI$ / WHATSNEW.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  2.5 KB  |  82 lines

  1. function whatsnew(arg)
  2. %WHATSNEW Display Readme files for MATLAB and toolboxes.
  3. %    WHATSNEW <toolboxpath> displays the Readme file for the toolbox
  4. %    with the specified toolbox path.  For example,
  5. %
  6. %    whatsnew matlab    - Display MATLAB's Readme file.
  7. %    whatsnew signal    - Display Signal Processing Toolbox Readme file.
  8. %    whatsnew control   - Display Control Toolbox Readme file.
  9. %
  10. %    The Readme files, if they exist for each product, contain descriptions
  11. %    of new functionality that is not described in the documentation.
  12. %
  13. %    See also VER, HELP, WHICH, PATH, LOOKFOR.
  14.  
  15. %    (c) Copyright 1984-93 by The MathWorks, Inc.
  16.  
  17. if nargin == 0 & isunix    % display some help
  18.     disp(' ')
  19.     disp('The following documents from the MATLAB 4.0 documentation set are')
  20.     disp('available in compressed PostScript form in the event you don''t have')
  21.     disp('your own printed copy. They provide information on what''s new in ')
  22.     disp('this release of MATLAB and on converting from MATLAB 3.5 to MATLAB 4.0.')
  23.         disp(' ')
  24.         disp('The online versions of the New Features Guide and Release Notes')
  25.         disp('may contain information not found in the hardcopy versions.')
  26.         disp(' ')
  27.     disp('   MATLAB 4.0 New Features Guide:')
  28.     disp(['      ', getenv('MATLAB'),'/toolbox/matlab/newfeatures.ps.Z'])
  29.     disp(' ')
  30.     disp('   MATLAB 4.0a Release Notes:')
  31.     disp(['      ', getenv('MATLAB'),'/toolbox/matlab/relnotes.ps.Z'])
  32.     disp(' ')
  33.     disp('   SIMULINK 1.2b Release Notes:')
  34.     disp(['      ', getenv('MATLAB'),'/toolbox/simulink/relnotes1.2b.ps.Z'])
  35.     disp(' ')
  36.     disp('To print them, use a command of the form: zcat newfeatures.ps.Z | lpr')
  37.     disp(' ')
  38.     disp('To find out about undocumented features, use WHATSNEW with an argument:')
  39.     help whatsnew
  40.         return
  41. elseif nargin == 0
  42.    help whatsnew
  43.         return
  44. end
  45. p = path;
  46. pathsep = ':';
  47. filesep = '/';
  48. c = computer;
  49. if strcmp(c(1:2),'PC')
  50.     pathsep = ';';
  51.     filesep = '\';
  52. elseif strcmp(c(1:2),'MA')
  53.     pathsep = ';';
  54.     filesep = ':';
  55. elseif strcmp(c(1:2),'VA')
  56.     if strcmp(c(1:6),'VAXVMS')
  57.         pathsep = ',';
  58.         filesep = ']';
  59.     end
  60. end
  61. if strcmp(arg,'matlab')
  62.    arg = 'general';
  63. end
  64. seps = find(p == pathsep);
  65. first = [1 seps+1];
  66. last = [seps-1 length(p)];
  67. larg = length(arg);
  68. wd = cd;
  69. for i = 1:length(first)
  70.    pp = p(first(i):last(i));
  71.    lp = length(pp);
  72.    if lp >= larg
  73.       if strcmp(arg,pp(lp-larg+1:lp))
  74.          cd(pp);
  75.          if exist([pp filesep 'Readme.m'])==2
  76.             help Readme
  77.          end
  78.       end
  79.    end
  80. end
  81. cd(wd);
  82.