|
Contents | Previous | Next | Subchapters |
autoexec.oms is automatically
included when O-Matrix starts and after every clear command.
The default copy of this file is in the installation directory
(usually c:\omwin). It sets the search path to include
the function, lib, toolbox, tools,
and tecplot directories in that order.
It also defines the following constants:
| Name | Meaning |
DQUOTE |
" character |
TAB | tab character |
NEW_LINE | new line character |
NEW_PAGE | new page character |
PI | double-precision pi |
REAL_EPSILON | single precision machine epsilon |
DOUBLE_EPSILON | double-precision machine epsilon |
REAL_MAX | maximum normalized single-precision number |
DOUBLE_MAX | maximum normalized double-precision number |
REAL_MIN
| minimum positive normalized single-precision number |
DOUBLE_MIN
| minimum positive normalized double-precision number |
INT_MAX | maximum allowable integer constant |
NAN | double-precision version of not a number |
INF | double-precision version of infinity |
OM_INSTALL | directory where O-Matrix is installed |
TECHOME | directory where Tecplot is installed |
autoexec.oms
and put it either in the current directory, or in a directory
that comes before the installation directory in the search
path
.
If you do this, O-Matrix will use your version of the
autoexec.oms file.
#
local ominstall = [";", NEW_LINE, OM_INSTALL]
path([ ...
OM_INSTALL, ...
ominstall, "\function", ...
ominstall, "\lib", ...
ominstall, "\toolbox", ...
ominstall, "\tools", ...
ominstall, "\ipacks", ...
ominstall, "\tecplot", ...
ominstall, "\stsa\arma", ...
ominstall, "\stsa\bayes", ...
ominstall, "\stsa\filter", ...
ominstall, "\stsa\nonlin", ...
ominstall, "\stsa\nonpar", ...
ominstall, "\stsa\optimize", ...
ominstall, "\stsa\pod", ...
ominstall, "\stsa\rng", ...
ominstall, "\stsa\spectral", ...
ominstall, "\stsa\stats", ...
ominstall, "\IPT\dll", ...
ominstall, "\IPT\oms" ...
] )
MathWorks variable
to the location of those files and set the variable
Octave = false.
local ominstall = [";", NEW_LINE, OM_INSTALL]
local MathWorks = [";", NEW_LINE, "c:\m4files"]
local Octave = true
#
if Octave then begin
mlpath([ ...
mlpath, ...
ominstall, "\toolbox", ...
ominstall, "\octave" ...
] )
end else begin
mlpath([ ...
mlpath, ...
ominstall, "\toolbox", ...
MathWorks, ...
MathWorks, "\general", ...
MathWorks, "\ops", ...
MathWorks, "\lang", ...
MathWorks, "\elmat", ...
MathWorks, "\elfun", ...
MathWorks, "\specfun", ...
MathWorks, "\specmat", ...
MathWorks, "\matfun", ...
MathWorks, "\datafun", ...
MathWorks, "\polyfun", ...
MathWorks, "\funfun", ...
MathWorks, "\sparfun", ...
MathWorks, "\strfun", ...
MathWorks, "\iofun", ...
MathWorks, "\timefun", ...
MathWorks, "\tools" ...
] )
end
# force loading of run-time libraries
unirnd(0., 1., 2, 1);
{[1d0,2], [3,4]} * {[1d0,2], [3,4]};
displayExamples = islight
# Uncomment the following line to make the Example Navigator to be
# available from the O-Matrix "Tools" menu
#displayExamples = true
# If you are not using Tecplot, or if you do not need to call
# O-Matrix scripts from Tecplot you should comment out the following lines
#include tecplot\tphome.oms
#tppoll(getenv(tphome()), 750)
# If you have more than one version of Tecplot installed you can
# set the following variable to force O-Matrix to use desired version
const TECHOME = novalue
if( coldim(getenv("OMP_NUM_THREADS")) < 1 ) then begin
print "Warning: the OMP_NUM_THREADS environment variable is not set"
print "See the Using Multiple CPUs chapter of the O-Matrix manual"
print "appendix for instructions on setting this environment variable"
end
if displayExamples then begin
execfile([OM_INSTALL,"\example\examples.oms"])
addmenu("Tools","Example Navigator","DisplayNavigator")
end
# If the SigmaPlot Interface Toolkit is installed, make sure SP is not running
if( exists([OM_INSTALL,"\ipacks\spquit.oms"]) ) then begin
if( cocreate == "SigmaPlot.Application.1") then begin
while cowith > 0 begin # same as spquit, but manual because in autoexec
coendwith;
end
coinvoke("Quit");
end
end
corelease;
# Load Anona Lab Image Processing Toolbox if it has been installed
if( exists([OM_INSTALL,"\IPT\oms\LoadAnona.oms"]) ) then begin
eval(["include ", OM_INSTALL, "\IPT\oms\LoadAnona.oms"])
end
# Uncomment these lines if you want the O-Matrix wizards to be
# available from the Tools menu
showTools = true
showTools = islight
if showTools then begin
addmenu("Tools","File Plotter","fileplotdlg");
addmenu("Tools","Digital Filter Designer","digfilter");
addmenu("Tools","Least-Squares Tool","linlsqdlg");
addmenu("Tools","Polynomial Fitter","polfitdlg");
end