home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fb.zip / octave / README.OS2 < prev    next >
Text File  |  2000-01-15  |  16KB  |  427 lines

  1. Octave -- a high-level language for numerical computations.
  2.  
  3.  
  4.   **************************************************************************
  5.   **                    P L E A S E   N O T E                             **
  6.   **************************************************************************
  7.   **  Because i no longer work for the Technical University of            **
  8.   **  Darmstadt, my email address has changed:                            **
  9.   **                                                                      **
  10.   **    100114.1371@compuserve.com                                        **
  11.   **    gebhardt@wotan.ikp.physik.tu-darmstadt.de                         **
  12.   **                                                                      **
  13.   **  The CompuServe address is the more reliable address!                **
  14.   **                                                                      **
  15.   **  Sorry for the inconvenience,                                        **
  16.   **  Klaus Gebhardt                                                      **
  17.   **************************************************************************
  18.  
  19.  
  20.  
  21.   **************************************************************************
  22.   **                    P L E A S E   N O T E                             **
  23.   **************************************************************************
  24.   ** This is a development version of Octave.  Development releases       **
  25.   ** are provided for people who want to help test, debug, and improve    **
  26.   ** Octave.                                                              **
  27.   **                                                                      **
  28.   ** If you want a stable, well-tested version of Octave, you should be   **
  29.   ** using one of the stable releases (when this development release      **
  30.   ** was made, the latest stable version was 2.0.13).                     **
  31.   **************************************************************************
  32.  
  33.  
  34.  
  35. Overview
  36. --------
  37.  
  38. Octave is a high-level language, primarily intended for numerical
  39. computations.  It provides a convenient command line interface for
  40. solving linear and nonlinear problems numerically.
  41.  
  42. Octave is free software; you can redistribute it and/or modify it
  43. under the terms of the GNU General Public License as published by the
  44. Free Software Foundation; either version 2, or (at your option) any
  45. later version.
  46.  
  47. Octave is distributed in the hope that it will be useful, but WITHOUT
  48. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  49. FITNESS FOR A PARTICULAR PURPOSE.  See the file COPYING for more
  50. details.
  51.  
  52.  
  53.  
  54. Used Compiler and Libraries
  55. ---------------------------
  56.  
  57. Octave for OS/2 is compiled using EMX-GCC 0.9C (with EMXFIX04) and
  58. libg++ 2.7.2.
  59.  
  60. The fortran routines are translated to C using f2c.
  61.  
  62.  
  63.  
  64. Binary Distribution
  65. -------------------
  66.  
  67. Why a binary distribution?
  68.  
  69. 1. There are only minor changes made in the source files of octave. The main
  70.    job was patching stdcpp, info, kpathsea and readline.
  71.  
  72. 2. octave is big (40 MB with the source, object files and libraries) and it
  73.    takes time to compile the program. (ca. 50 minutes on my
  74.    133 MHz Pentium-Overdrive system = ca. 8 hours on a 486DX-33).
  75.  
  76.  
  77.  
  78. Compiling Octave
  79. ----------------
  80.  
  81. If you want to compile Octave yourself you must download the patched sources and
  82. unpack them. Modify the paths in the file makeversions depending on your
  83. system setup an run 'make octave'.
  84.  
  85.  
  86.  
  87. Files
  88. -----
  89.  
  90. The files BUGS, CHANGELO, CHANGELO.1, COPYING, NEWS, NEWS.1, PROJECTS, README,
  91. ROADMAP, SENDING.PAT and THANKS are part of the octave 2.1.23 source code.
  92.  
  93. In the zip file scripts.zip are the scripts coming with octave 2.1.23.
  94. The installation script will unzip the correct set of script files for
  95. your file system.
  96.  
  97. The files COPYING.EMX, emx.dll, emxlibcs.dll and termcap.dat are part of the
  98. emx 0.9c package  (with EMXFIX04 applied, see COPYING.EMX).
  99.  
  100. octave.exe and octave.ico are the executable and the icon of the main program.
  101. The file octave.exe must no longer be build by the install program!
  102.  
  103. info.exe is the standalone info browser coming with EMX. It was recompiled
  104. so that info.exe and octave.exe uses the same DLL (gnuinfo.dll). And it is
  105. patched so that info.exe accepts the '--index-search' option.
  106.  
  107. gnuview.exe is a replacement for info.exe: It accepts the same command
  108. line option, but it starts OS/2s view.exe.
  109.  
  110. mkfifo.exe is the utility for creating, removing and listing named pipes. It
  111. starts the program nmpserv.exe, if neccessary.
  112.  
  113. The program oct-view.exe is used for starting the image viewer.
  114.  
  115. README.OS2 is the file you are reading.
  116.  
  117. In the directory 'lisp' you find the elisp files (and the compiled elisp files)
  118. you need to run Octave in an Emacs subshell and the files for editing script
  119. files or temporary files of octave using the Emacs editor.
  120.  
  121. In the directory 'doc' you can find the documentation in dvi, postscript,
  122. and also the info files and the INF files.
  123.  
  124. In the directory 'dll' you can find the Dynamic Link Libraries of octave and
  125. emx, and the file termcap.dat is in the directory etc.
  126.  
  127. All files you need for using the dynamic loading in Octave for loading your
  128. own C++ routines into Octave are in 'dlfcn' and its subdirectories.
  129.  
  130.  
  131.  
  132. Other Files of Interest
  133. -----------------------
  134.  
  135.  
  136. octa21Fb.zip or octave-2.1.23-b??.zip:
  137.                The binary distribution of Octave-2.1.23.
  138. octa21Fp.zip or octave-2.1.23-p??.zip:
  139.                This archive contains always the update to the newest build.
  140. octa21Fs.zip or octave-2.1.23-s??.zip:
  141.                The patched source code for octave (including info, kpathsea,
  142.                iostream, readline and pnm).
  143.  
  144. You need also the following packages. They are available on ftp.cdrom.com,
  145. hobbes.nmsu.edu and wotan.ikp.physik.tu-darmstadt.de. less and gnufutil
  146. should be also on ftp.uni-stuttgart.de and ftp.leo.org, and the gnuplot
  147. beta on cmpc1.phys.soton.ac.uk.
  148.  
  149. less252-2.zip: The less pager ported by Kai Uwe Rommel.
  150.                (I know there is a newer version, but i forgot the number :-))
  151. gp315os2b.zip: GNUPLOT 3.6 (beta 315)
  152. gnufutil.zip : The GNU file utilities.
  153. pmvu93.zip   : PM View 0.93.
  154.  
  155.  
  156. Updating to the most recent build level
  157. ---------------------------------------
  158.  
  159.   **************************************************************************
  160.   **  BEFORE APPLYING A PATCH MAKE SURE THAT THE PATCH IS FOR YOUR        **
  161.   **  INSTALLED OCTAVE VERSION (CHECK THE TIMESTAMPS OF THE FILES).       **
  162.   **************************************************************************
  163.   **  DO NOT INSTALL AN OLDER PATCH OVER A NEWER VERSION OF OCTAVE!       **
  164.   **************************************************************************
  165.  
  166. 1. First you must install Octave. See Installation below.
  167. 2. Unzip the patches into the directory you have Octave/2 installed in.
  168. 3. Change into that directory and type 'updt-octave'
  169. 4. Type 'inst-octave /clean'
  170.  
  171.  
  172. Installation
  173. ------------
  174.  
  175. Change to the directory of octave and run install (REXX must be installed!):
  176.  
  177. 1.  Type 'inst-octave /install':
  178.     The script make changes in the config.sys, .octaverc, .emacs and dir.
  179.     It unzips the scriptfiles, removes older emx-dlls, copies the info-files
  180.     to the INFO directory and creates an object on the desktop!
  181.     For all modified or deleted files it will create backups in the current
  182.     directory.
  183.  
  184.   **************************************************************************
  185.   **  BEFORE REBOOTING CONFIRM THE CHANGES THIS SCRIPT WILL HAVE DONE     **
  186.   **  IN YOUR CONFIG.SYS!                                                 **
  187.   **************************************************************************
  188.   **  IF THERE IS SOMETHING WRONG PLEASE SEND ME A NOTE!                  **
  189.   **************************************************************************
  190.  
  191. 2.  If necessary the script will ask you to reboot. Do so.
  192.  
  193. 3.  To save disk space you can use 'inst-octave /clean'. All the files you
  194.     don't need for running octave are deleted. All backup files are also
  195.     removed.
  196.  
  197. The setup script modify the following parts of the config.sys, if necessary:
  198.  
  199.   PATH=...;h:\apps\science\octave;
  200.   LIBPATH=...;h:\apps\science\octave\dll;
  201. The directory you have Octave installed in:
  202.   SET OCTAVE_HOME=c:/octave
  203. Terminal type and a pointer to the TERMCAP.DAT file:
  204.   SET TERM=ansi
  205.   SET TERMCAP=h:/apps/science/octave/etc/termcap.dat
  206. Your home directory (place of your initialization files)
  207.   SET HOME=h:/.
  208. The name of the initialization file:
  209.   SET OCTAVE_INITFILE=octave.ini
  210. The directory for your info files:
  211.   SET INFOPATH=.;h:/apps/science/octave/doc
  212. The directory of Gnuplot:
  213.   SET GNUPLOT=h:/apps/science/gnuplot
  214.  
  215.  
  216. Running Octave
  217. --------------
  218.  
  219. When you start octave (without -f, --norc or --ignore-init-file), octave will
  220. execute the following files:
  221.  
  222. 1. scripts\startup\octaverc:
  223.   Octave will use the editor 'emacsclient' and the pager 'less'. The info
  224.   files are located using the environment variable INFOPATH and the
  225.   gnuplot_binary using the environment variable GNUPLOT.
  226.  
  227. 2. The file, which name is given by the environment variable OCTAVE_INITFILE,
  228.   or .octaverc, if there is no OCTAVE_INITFILE. Both are searched in your
  229.   HOME directory.
  230.  
  231. You can use octave as an external processor in an batch file, if the first
  232. line in the batch file is
  233.   extproc octave -q
  234. or
  235.   EXTPROC octave -q.
  236. This is the same as using octave -q file.cmd.
  237.  
  238.  
  239.  
  240. GNUPLOT
  241. -------
  242.  
  243. Octave uses GNUPLOT to display plots. I have tested octave with GNUPLOT 3.6
  244. (beta 315). The system-wide startup file octaverc in the directory
  245. scripts/startup reads the environment variable GNUPLOT and appends
  246. "/gnuplot.exe". This should be the path and name of GNUPLOT. So if the
  247. executable (gnuplot.exe) is in the directory h:\apps\science\gnuplot
  248. add the following line to your config.sys:
  249.  
  250.   SET GNUPLOT=h:/apps/science/gnuplot
  251.  
  252. You must use the beta of GNUPLOT because it supports multiple plots.
  253.  
  254.  
  255.  
  256. PAGER
  257. -----
  258.  
  259. If you want to use the less pager, you need the file less252-2.zip or newer.
  260. This less port does not use the termcap library, so it is unable to work with
  261. ansi-color-2, ansi-color-3,...
  262.  
  263. If you want to use ansi-color-3, you must recompile less after deleting
  264. termcap.c and adding the termcap-library in the makefile, or you must edit
  265. the file termcap.dat: Replace every tc=ansi in the termcap.dat by the lines
  266. following ansi.
  267.  
  268.  
  269.  
  270. EMACS
  271. -----
  272.  
  273. You can use emacs to edit the script files of octave. To do so add the lines 
  274.  
  275.   (setq load-path (append '("h:/apps/science/octave/lisp") load-path))
  276.   (autoload 'octave-mode "octave-mode" "Enter Octave mode." t)
  277.   (setq auto-mode-alist (cons '("\\.[Mm]$" . octave-mode) auto-mode-alist))
  278.   (defun my-octave-mode-hook ()
  279.     (setq fill-column 76)
  280.     (auto-fill-mode 1))
  281.   (setq octave-mode-hook 'my-octave-mode-hook)
  282.   (setq octave-prog-filename "h:/apps/science/octave/octave.exe")
  283.  
  284. to your .emacs.
  285.  
  286.  
  287. If you run emacs in server mode, octave can use the emacsclient for editing
  288. temporary files. Add the following lines to .emacs:
  289.  
  290.   (autoload 'octave-tmp-mode "octave-tmp-mode" "Enter Octave's tmp mode." t)
  291.   (setq auto-mode-alist
  292.     (cons '("[Oo][Cc][Tt]-....\\.[Tt][Mm][Pp]$" . tmp-mode)
  293.      auto-mode-alist))
  294.  
  295. The tmp mode is the normal text mode with one exception: If you finished
  296. editing by pressing C-x # the buffer is killed. So octave can delete the file.
  297.  
  298.  
  299. If you want to run Octave in a special shell mode under Emacs you must also
  300. add the following line to .emacs:
  301.  
  302.   (require 'octave)
  303.  
  304. There is also another octave shell mode, which is normally part of
  305. Octave. The file is called octave.el. I do not use it, because it created
  306. a lot of problems on my system AND it won't work correctly.
  307.  
  308. For example your .emacs file should look like this:
  309.  
  310.   (setq load-path (append '("h:/apps/science/octave/lisp") load-path))
  311.   (require 'octave)
  312.   (autoload 'octave-mode "octave-mode" "Enter Octave mode." t)
  313.   (setq auto-mode-alist (cons '("\\.[Mm]$" . octave-mode) auto-mode-alist))
  314.   (defun my-octave-mode-hook ()
  315.     (setq fill-column 76)
  316.     (auto-fill-mode 1))
  317.   (setq octave-mode-hook 'my-octave-mode-hook)
  318.   (setq octave-prog-filename "h:/apps/science/octave/octave.exe")
  319.   (autoload 'octave-tmp-mode "octave-tmp-mode" "Enter Octave's tmp mode." t)
  320.   (setq auto-mode-alist
  321.         (cons '("[Oo][Cc][Tt]-....\\.[Tt][Mm][Pp]$" . octave-tmp-mode)
  322.               auto-mode-alist))
  323.  
  324.  
  325.  
  326. Dynamic Loading of C++ Functions
  327. --------------------------------
  328.  
  329. This port now supports the dynamic loading. Use the script MAKE-OCTFILE to
  330. compile your scripts EVERY time you installed a new version of Octave! The
  331. script MAKE-OCTFILE is created by INST-OCTAVE.
  332.  
  333. For example:
  334.  
  335.   cd dlfcn\examples
  336.   make-octfile hello.cc
  337.  
  338. and add the path '.../dlfcn/examples' to Octave's LOADPATH; start Octave and
  339. type 'hello (1,2,3)'.
  340.  
  341. You can find examples in the directories '.../dlfcn/examples' and
  342. 'scripts/image/codecs'.
  343.  
  344.  
  345.  
  346. Images
  347. ------
  348.  
  349. Octave for OS/2 uses the excellent PM View. If you want to use a different
  350. viewer or if your PM View is installed in directory other then
  351. h:\apps\graphics\pmview, set the environment variable OCTAVE_IMAGE_VIEWER.
  352. You can use the environment variable OCTAVE_IMAGE_VIEWER_OPT for specifying
  353. command line options: For example:
  354.  
  355. SET OCTAVE_IMAGE_VIEWER=c:\pmview\pmview.exe
  356. SET OCTAVE_IMAGE_VIEWER_OPT=/WPos(,,,,ForAct)
  357.  
  358. For loading and saving images Octave uses now the DLFCN feature. Octave can
  359. read and write BMP, PNM, IMG formats and write Postscript.
  360.  
  361.  
  362.  
  363. MKFIFO
  364. ------
  365.  
  366. The mkfifo command is now supported! You can use Octave's mkfifo command
  367. to create a named pipe for communication with another program (local or
  368. in a LAN). There is also a utility called mkfifo, which can be used for
  369. creating, removing, listing named pipes, you have created with mkfifo.
  370. The names of the pipes must start with '\PIPE' or with '/PIPE'. If you want
  371. access to a pipe on another computer in your LAN you must prepend
  372. '\\HOSTNAME', where HOSTNAME stands for the name of the computer.
  373.  
  374. For example:
  375. 1) Start octave.
  376. 2) Open an OS/2 window.
  377. 3) Run mkfifo \PIPE\TEST
  378. 4) Type 'echo abcdef >\PIPE\TEST' in the OS/2 window
  379. 5) In Octave execute the following commands:
  380.    fid = fopen ("/PIPE/TEST", "r");
  381.    fgets (fid)
  382.    fclose (fid);
  383. 6) Run mkfifo -d \PIPE\TEST in the OS/2 window
  384.  
  385. To speed up the execution of the first mkfifo command you can add the
  386. following in your STARTUP.CMD:
  387.  
  388. detach [DRIVE:]\[PATH]\nmpserv --noexit
  389.  
  390.  
  391.  
  392.  
  393. Known Limitations, Modifications and Bugs
  394. -----------------------------------------
  395.  
  396. 1) fork is not supported, use spawn instead. Compare the script file popen2.m
  397.    with the original version (popen2.org).
  398.  
  399. 2) dup2 has been renamed to _dup2
  400.  
  401. 3) Because of an OS/2 limitation dynamic loading of C++ functions will only
  402.    work, if the length of the function name is less than 8 characters.
  403.  
  404.  
  405.  
  406. Comments, Bugs, Problems, Ideas, ...
  407. ------------------------------------
  408.  
  409. If you have any problem installing or using this port, let me know!
  410.  
  411. If have any idea to make octave for OS/2 a better program, send me a mail.
  412. Also any comments are welcome.
  413.  
  414. And thanks for all your nice mails i received, and thanks to all of you
  415. helping me to remove the bugs.
  416.  
  417. My email addresses are:
  418.  
  419. INTERNET:    100114.1371@compuserve.com
  420.              gebhardt@wotan.ikp.physik.tu-darmstadt.de
  421.  
  422. CompuServe:  100114,1371
  423.  
  424. Klaus Gebhardt [TEAM OS/2]
  425. Competence Center Architecture and Technology
  426. Deutsche Boerse Systems
  427.