home *** CD-ROM | disk | FTP | other *** search
/ CD Concept 6 / CD Concept 06.iso / mac / UTILITAIRE / RLaB / README.mac < prev    next >
Encoding:
Text File  |  1995-02-08  |  11.0 KB  |  256 lines  |  [TEXT/ttxt]

  1.                                                 
  2.                                                             02/08/1995
  3.  
  4.  
  5. This is the Macintosh port of RLaB 1.17d program. RLaB is a Matlab-like 
  6. linear algebra package.  The author is 
  7.     
  8.          Ian Searle
  9.          ians@eskimo.com
  10.     
  11. RLaB is an interpreter for the RLaB Programming Language/Environment. 
  12. The RLaB language is useful for matrix or array oriented numerical
  13. analyses. RLaB is especially useful for prototyping and experimenting 
  14. with algorithms. RLaB extensively uses the BLAS, LAPACK, FFTPACK and 
  15. RANLIB sources available from netlib.att.com and PLPLOT from 
  16. dino.ph.utexas.edu.
  17.         
  18. MacRLaB is not a full port of RLaB.  Some items will probably never
  19. be fully supported as they are too tied to the Unix operating system.  
  20. Examples are the 'pipe', the 'fork', and many others.  
  21. Other features are handled a little differently in the Mac version.  
  22. Most of the important differences or extensions of the MacRLaB port 
  23. are described below.
  24.  
  25. 1. Please print out and study the RLaB Primer first, the file is in
  26.    ":doc:rlabp.ps". You can print this Postscript file using 'DropÑPS' 
  27.    program (simply drag and drop it onto DropÑPS).
  28.   
  29.    The full history command editing capacity is built-in.  To recall 
  30.    previous commands, just press up and down arrow keys.  
  31.    The 'control' key described in the RLaB Primer can be replaced by the 
  32.    'command' key on the Mac keyboard.  Delete-cursor-character (del) is also 
  33.    supported.  The full description of command line editing is in the file
  34.    ":help:COMMAND_EDIT", or type "help COMMAND_EDIT" in RLaB.
  35.  
  36. 2. In this version, you can set up your own file search-path(RLAB_SEARCH_PATH), 
  37.    start-up file (RLAB_RC0), etc.. The default settings are stored in the file 
  38.    'RLab-Preference'. 
  39.    
  40.    To change these settings, just use a text editor to change.  You have to
  41.    set the PLPLOT_DIR environmental variable to the path of your RLaB folder.  
  42.    This setting is important because PLPLOT has to know the location of font 
  43.    files 'plstnd5.fnt' and 'plxtnd5.fnt'.  After making the changes, the file 
  44.    'RLab-Preference' has to be placed in the 'System Folder:Preferences' folder.
  45.  
  46.    For example, if your absolute RLaB folder (directory) path is like this
  47.    
  48.    HD --- Appl --- RLaB 
  49.    
  50.    then you can put the following environmental variables in 'RLab-Preference':
  51.    
  52.    RLAB_RC0 = "HD:Appl:RLaB:_rlab";
  53.    PLPLOT_DIR = "HD:Appl:RLaB";
  54.    RLAB_HELP_DIR = "HD:Appl:RLaB:help";
  55.    RLAB_LIB_DIR = "HD:Appl:RLaB:rlib";
  56.    RLAB_SEARCH_PATH = ";HD:Appl:RLaB:toolbox;HD:Appl:RLaB:examples"; 
  57.  
  58.    You can have several search-paths, just put them together and use ';' as
  59.    delimiter (see above example with 3 search paths, first one is for the
  60.    current folder).
  61.    
  62.    If you feel the font/size on the MacRLaB console is not the best choice, 
  63.    feel free to change it.  The environmental variable RLAB_FONT can be set
  64.    to one of the following numbers (check Mac document for more):
  65.    
  66.                0 SystemFont
  67.                1 AppleFont
  68.                2 NewYork
  69.                3 Geneva
  70.                4 Monaco
  71.                5 Venice
  72.                6 London
  73.                7 Athens
  74.                8 SanFrancisco
  75.                9 Toronto
  76.               11 Cairo
  77.               12 LosAngles
  78.               20 Times
  79.               21 Helvetica
  80.               22 Courier
  81.  
  82.    It is better to use constant width fonts such as Monaco and Courier,
  83.    otherwise the output will not be aligned.
  84.    The font size (RLAB_SIZE) can be set to any number between 1 and 127 point.  
  85.    The popular font sizes for the console are 
  86.                
  87.                9 points
  88.               10 points
  89.               11 points
  90.               12 points
  91.               14 points
  92.               18 points
  93.               
  94.    You can change the number of text rows (RLAB_ROWS) on the console.  
  95.    Default values are   
  96.  
  97.               RLAB_FONT = "4 Monaco";
  98.               RLAB_SIZE = "9 points";
  99.               RLAB_ROWS = "25";
  100.     
  101.    The console window width will be set to 80 columns based on the largest 
  102.    character width of the selected font.
  103.            
  104. 3. RLaB comes with a built-in plotting library PLPLOT.  PLPLOT is a powerful 
  105.    tool for XY and XYZ graphics.  It can generate (via plprint) Postscript, 
  106.    color Postscript, HP LJ, and lots of other formats for post processing. 
  107.  
  108.    I've implemented a minimum Mac interface for PLPLOT4.99i.  Multi-window is 
  109.    allowed but the redrawing is slow; well, that depends on what machine you 
  110.    got.  The number of windows is limited to 10.  
  111.    
  112.    The mac-plplot interface is based on ColorQuickDraw routines.  Sixteen 
  113.    colors are directly available in PLPLOT. These colors are pre-assigned 
  114.    as the following numbers:
  115.    
  116.       1       2         3        4        5         6         7       8
  117.      black   red    yellow      green  aquamarine  pink     wheat   gray
  118.    
  119.       9      10        11       12       13        14        15      16
  120.      brown   blue   blueviolet  cyan   turquoise   magenta  salmon  white 
  121.       
  122.    You can select color by _plcol() function.  More colors are available by
  123.    using RGB combinations (see PLPLOT manual). There are three things remained  
  124.    to be done -- add scroll bar to the MacRLaB window, add copy/paste ability 
  125.    in the graphics windows, and add PICT image to the generated EPSF files.
  126.    
  127.    You can include the PLPLOT generated Postscript output (EPSF) in your 
  128.    document (Word, MacDraw, Canvas, TeX, ...) but you can only see a 
  129.    big crossed box (the bounding box) on the screen due to the lack of the 
  130.    PICT image. You can perform scaling, rotating, dragging,... on the box 
  131.    except there is no picture inside.  Don't worry, the picture will appear 
  132.    in the printed copy.
  133.    
  134.    If you need superscript, subscript, over/under line char, and Greek letters 
  135.    in annotation of axis, title, etc., then you need to get a copy of PLPLOT 
  136.    manual.  See README.PLPLOT for detail.  
  137.    
  138.    There is a plotting example in ":examples:plot_test.r", try
  139.    
  140.    >rfile plot_test
  141.  
  142.    You can click on those background windows to see them again. The graphics 
  143.    windows are numbered as plplot 0, plplot 1, plplot 2, ..., and so on.  You 
  144.    can also resize or drag them.  Resizing on the screen will not affect 
  145.    the quality of later plprint() output. 
  146.    
  147.    For each graph window, there is a temporary file (SCRATCH????) 
  148.    associated with it.  It contains your plotting commands which can be used
  149.    later to produce a Postscript or other types of graphics file (via
  150.    plprint).  It is also used by my Mac interface in redrawing.  Don't dump
  151.    them into trash can during the execution of MacRLaB.   They will be 
  152.    automatically eliminated after the execution.   Also, don't use pend() 
  153.    to close graphics windows unless you don't want to plot anymore. Use 
  154.    pclose() instead.  plplot has a bug that it does not close the plotting 
  155.    command file even you close the graphics window by pend() or pclose().  
  156.    So if you plot after pend(), the old picture together with the new picture
  157.    will appear on the graphics window.
  158.    
  159.    If you plot several pages of PS graph into a file, you have to change 
  160.    the file type to 'TEXT' (all capital) by drag and drop the file onto
  161.    ctc 1.5.  After the file type has been changed, you can print it out 
  162.    by DropÑPS or ShowPages.  Why?  Because plplot creates the PS output file
  163.    in binary mode, but DropÑPS and ShowPages accept only TEXT file.
  164.       
  165. 4. By the way, do you know how to change directory (folder) using cd() on the 
  166.    Mac? 
  167.    
  168.    Suppose your hard disk directory tree is like this
  169.    
  170.                             ----- Peggy
  171.                             |                             |-- rlib
  172.          --------- App -----|                             |
  173.          |                  |                             |-- examples
  174.    HD ---|                  ----- RLaB (you are here) ----|
  175.          |                                                |-- help
  176.          -------- Kevin                                   |
  177.                                                           |-- toolbox
  178.          
  179.    When you launch RLaB, you are in RLaB directory.  If you wish to 
  180.    change directory to "examples", you can use either
  181.    
  182.    >cd(":examples");  // relative method
  183.    
  184.    or
  185.    
  186.    >cd("HD:App:RLaB:examples");  // absolute method
  187.    
  188.    The colon ":" means present directory, it is similar to "." on the Unix
  189.    but not exactly the same.  You MUST supply a ":" as first char if partial 
  190.    (relative) pathname is used.  If the first character of a pathname is not 
  191.    a ":", it is a full (absolute) pathname.  Two colons "::" means parent 
  192.    directory (folder).  Three colons ":::" means grandparent directory.
  193.    The ":" character also acts as directory delimiter, like "/" on the unix 
  194.    and "\" on the MS-DOS.
  195.    
  196.    For example, if your work directory is in Kevin and you are in 
  197.    RLaB now,  you can use either
  198.    
  199.    >cd(":::Kevin");   // relative method
  200.    
  201.    or
  202.    
  203.    >cd("HD:Kevin");   // absolute method
  204.    
  205.    to change directory to Kevin.
  206.    
  207. 5. Your machine must have a 68020 or better cpu run MacRLaB.  You also need 
  208.    System 7 to run it.  If your machine does not have an fpu (68881 or 
  209.    better) then you should run  MacRLaB-nofpu instead of MacRLaB.
  210.    The execution speed of MacRLaB is approximately 7.5 times faster than
  211.    MacRLaB-nofpu.
  212.    
  213.    Try
  214.    
  215.    >load("test")
  216.  
  217.    on your machine to see if your machine can pass all tests.
  218.          
  219. 6. The total size of arrays is only limited by the available memory of your 
  220.    machine.  If RLaB runs out of memory, it will display
  221.        
  222.         RLaB: out of memory. 
  223.         
  224.    on the screen.  You can either increase RLaB memory using 'Get Info' of 
  225.    System 7 Finder or, if your physical RAM is limited, turn on the virtual
  226.    memory and set the memory size large enough for your application.
  227.  
  228. 7. To interrupt RLaB during execution, type command-. (i.e. press command 
  229.    key + period key), it will return to the interactive mode in the next i/o.  
  230.    To abort RLaB and kick it out, you can use File-Quit (command-Q) on Menu bar. 
  231.    You can also do so by type in command-d at the beginning of a command 
  232.    line, or type "quit" directly.
  233.    If RLaB hangs, press command-option-esc to abort it.
  234.  
  235. 8. The source code of mac version is merged in the rlab source code 
  236.    distribution (see :misc:ftp-sites).  Those statements within 
  237.                #ifdef THINK_C  ... #endif 
  238.    are my modifications for THINK C 7.03 compiler on the Mac.  I've modified the 
  239.    console user interface.  Three difference files diff1, diff2, and diff3 
  240.    tell you those modifications (they are in :misc:MAC).  You also need f2c 
  241.    and POSIX libraries.  They are available in info-mac archives.
  242.    
  243. 9. If you wish to join the RLaB community, send an email to Ian 
  244.    (ians@eskimo.com) and ask him to add your name in the mailing list.  
  245.    You can reach the RLaB community by sending email to rlab-list@eskimo.com.
  246.    
  247. 10. We need more toolboxes.  Please send your useful rfiles to Ian.  Thanks.
  248.  
  249. 11. THIS IS FREE SOFTWARE. THERE IS NO WARRANTY FOR THE PROGRAM.  USE IT AT 
  250.     YOUR OWN RISK.  
  251.  
  252. Have fun!
  253.  
  254. Tzong-Shuoh Yang   
  255. (tsyang@ce.berkeley.edu) 
  256.