MLAB

Last updated
MLAB
Developer(s) Civilized Software Inc.
Initial release1985;39 years ago (1985)
Written in C, Assembler, MLAB [1]
Operating system Cross-platform: Microsoft Windows, Linux, and Mac OS X
Platform IA-32, x86-64
Type Numerical computing
License Proprietary commercial software
Website www.civilized.com/mlabdesc.html
MLAB
Paradigm multi-paradigm: functional, imperative, procedural, array
Designed by Gary D. Knott, Daniel R. Kerner, and Barry Bunow
Developer Civilized Software
First appearedlate 1970s
Typing discipline dynamic, weak
OS Cross-platform
Website www.civilized.com

MLAB (Modeling LABoratory) is a multi-paradigm numerical computing environment and fourth-generation programming language was originally developed at the National Institutes of Health. [2]

Contents

A proprietary programming language developed by Civilized Software, Inc., MLAB allows matrix manipulations, plotting of functions and data, and implementation of algorithms, and provides support for curve-fitting, differential equations, statistics and graphics.

MLAB is intended for numerical computing, with special facilities for ordinary differential equation-solving (ODE-solving) and curve-fitting (non-linear regression.) It provides more than thirty command types and more than 450 built-in functions from the areas of elementary mathematics, transcendental functions, probability and statistics, linear algebra, optimization, cluster analysis, combinatorics, numeric input/output, and graphics.

The usual low-level functions, e.g. sine, cosine, log, etc., are present, as well as functions performing more complex analyses, such as singular value decomposition, discrete Fourier transforms, solution of differential equation systems, non-parametric modeling and constrained non-linear optimization, among many others. A substantial collection of statistically oriented functions, such as most common distribution functions and their inverses, are included, as well as robust graph creation features, supporting graphing of exceptionally complex functions.

Many software packages can integrate ordinary differential equations numerically, but MLAB is one of the very few that also can adjust parameters and initial conditions. MLAB is equally facile at handling curve fitting, where the adjustments are linear or, as is the case with most differential equation models, nonlinear.

MLAB is widely used in academic and research institutions as well as industrial enterprises.

History

MLAB was originally developed at the National Institute of Health in the late 1970s using Stanford's SAIL running on Digital Equipment Corporation (DEC) PDP-10 computers. The creators of MLAB founded Civilized Software, Inc. in 1985 and expanded MLAB in the late 1980s and early 1990s through the application of Small Business Innovation Research grants.

MLAB was first adopted by researchers and practitioners in biochemistry, but quickly spread to many other domains. It is now also used in education, in particular the teaching of linear algebra, numerical analysis, and is popular amongst scientists involved in chemical kinetics analysis and modeling [3] and compartmental modeling in pharmacological (including pharmacokinetics) and physiological research.

Syntax

The MLAB application is built around the MLAB scripting language. Common usage of the MLAB application involves using the Command Window as an interactive mathematical or executing text (script) files containing MLAB code.

There are dozens of MLAB commands and hundreds of MLAB functions. In essence, MLAB is an interpreter for a high-level mathematical language with the ability to process re-runnable script files called do-files.

Example

In MLAB one can define a function and graph it as follows.

 function f(x) = a*cos(b*x)*exp(-k*x)  a = 1; b=4; k =.5  v=1:10!100  m= points(f,v)  draw m  view 

The result is a simple plot:

Mlabp8.png

Note that 1:10!100 = 1:10:0.0909090909, which means that we are dealing with a column vector of values from 1 to 10 in steps of size 0.0909090909

Also, note that points(f,v) = v&'(f on v), and that v$'(f on v) means the column-wise concatenation of the matrix v with the same-sized column vector consisting of the values of f computed on the values in v.

One can read-in 110 data values from a file into a 2-column matrix as follows (the result is a 55 row by 2 column matrix.)

 d = read("filename",55,2) 

Taking the rows of the matrix d as (x,y) data-points - with error in the y-values - where these data points are "modeled" by the function f, defined above, one can estimate the unknown parameters a,b,k as follows.

 fit(a,b,k), f to d 

One can use estimated weights for the various data points in d based on a moving-variance estimation function ewt as follows.

 fit(a,b,k), f to d with wt ewt(d) 

One can graph the data and the "fit" as follows.

 delete w  /* to discard any previous picture */  draw d linetype none, pointtype circle  draw points(f,d col 1) color green  view 

One can look at the symbolic derivative of f and graph it as follows.

 type f'x  draw points(f'x, d col 1) color red  view 

Note that MLAB can use symbolic-derivatives when derivative values are needed during curve-fitting, or solving ODEs. Also, note that one can fit (or just solve) differential-equation-defined models in MLAB, so that chemical kinetics and physiological and compartmental models can be handled.

See also

Related Research Articles

In mathematics, an equation is a mathematical formula that expresses the equality of two expressions, by connecting them with the equals sign =. The word equation and its cognates in other languages may have subtly different meanings; for example, in French an équation is defined as containing one or more variables, while in English, any well-formed formula consisting of two expressions related with an equals sign is an equation.

<span class="mw-page-title-main">Numerical analysis</span> Study of algorithms using numerical approximation

Numerical analysis is the study of algorithms that use numerical approximation for the problems of mathematical analysis. It is the study of numerical methods that attempt to find approximate solutions of problems rather than the exact ones. Numerical analysis finds application in all fields of engineering and the physical sciences, and in the 21st century also the life and social sciences, medicine, business and even the arts. Current growth in computing power has enabled the use of more complex numerical analysis, providing detailed and realistic mathematical models in science and engineering. Examples of numerical analysis include: ordinary differential equations as found in celestial mechanics, numerical linear algebra in data analysis, and stochastic differential equations and Markov chains for simulating living cells in medicine and biology.

<span class="mw-page-title-main">Differential calculus</span> Area of mathematics; subarea of calculus

In mathematics, differential calculus is a subfield of calculus that studies the rates at which quantities change. It is one of the two traditional divisions of calculus, the other being integral calculus—the study of the area beneath a curve.

<span class="mw-page-title-main">Mathematical optimization</span> Study of mathematical algorithms for optimization problems

Mathematical optimization or mathematical programming is the selection of a best element, with regard to some criterion, from some set of available alternatives. It is generally divided into two subfields: discrete optimization and continuous optimization. Optimization problems arise in all quantitative disciplines from computer science and engineering to operations research and economics, and the development of solution methods has been of interest in mathematics for centuries.

<span class="mw-page-title-main">Numerical methods for ordinary differential equations</span> Methods used to find numerical solutions of ordinary differential equations

Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary differential equations (ODEs). Their use is also known as "numerical integration", although this term can also refer to the computation of integrals.

Chemical kinetics, also known as reaction kinetics, is the branch of physical chemistry that is concerned with understanding the rates of chemical reactions. It is different from chemical thermodynamics, which deals with the direction in which a reaction occurs but in itself tells nothing about its rate. Chemical kinetics includes investigations of how experimental conditions influence the speed of a chemical reaction and yield information about the reaction's mechanism and transition states, as well as the construction of mathematical models that also can describe the characteristics of a chemical reaction.

<span class="mw-page-title-main">Curve fitting</span> Process of constructing a curve that has the best fit to a series of data points

Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints. Curve fitting can involve either interpolation, where an exact fit to the data is required, or smoothing, in which a "smooth" function is constructed that approximately fits the data. A related topic is regression analysis, which focuses more on questions of statistical inference such as how much uncertainty is present in a curve that is fitted to data observed with random errors. Fitted curves can be used as an aid for data visualization, to infer values of a function where no data are available, and to summarize the relationships among two or more variables. Extrapolation refers to the use of a fitted curve beyond the range of the observed data, and is subject to a degree of uncertainty since it may reflect the method used to construct the curve as much as it reflects the observed data.

<span class="mw-page-title-main">Differential equation</span> Type of functional equation (mathematics)

In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, and the differential equation defines a relationship between the two. Such relations are common; therefore, differential equations play a prominent role in many disciplines including engineering, physics, economics, and biology.

Numerical linear algebra, sometimes called applied linear algebra, is the study of how matrix operations can be used to create computer algorithms which efficiently and accurately provide approximate answers to questions in continuous mathematics. It is a subfield of numerical analysis, and a type of linear algebra. Computers use floating-point arithmetic and cannot exactly represent irrational data, so when a computer algorithm is applied to a matrix of data, it can sometimes increase the difference between a number stored in the computer and the true number that it is an approximation of. Numerical linear algebra uses properties of vectors and matrices to develop computer algorithms that minimize the error introduced by the computer, and is also concerned with ensuring that the algorithm is as efficient as possible.

<span class="mw-page-title-main">Pharmacokinetics</span> Branch of pharmacology

Pharmacokinetics, sometimes abbreviated as PK, is a branch of pharmacology dedicated to describing how the body affects a specific substance after administration. The substances of interest include any chemical xenobiotic such as pharmaceutical drugs, pesticides, food additives, cosmetics, etc. It attempts to analyze chemical metabolism and to discover the fate of a chemical from the moment that it is administered up to the point at which it is completely eliminated from the body. Pharmacokinetics is based on mathematical modeling that places great emphasis on the relationship between drug plasma concentration and the time elapsed since the drug's administration. Pharmacokinetics is the study of how an organism affects the drug, whereas pharmacodynamics (PD) is the study of how the drug affects the organism. Both together influence dosing, benefit, and adverse effects, as seen in PK/PD models.

Numerical continuation is a method of computing approximate solutions of a system of parameterized nonlinear equations,

<span class="mw-page-title-main">Finite element method</span> Numerical method for solving physical or engineering problems

The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat transfer, fluid flow, mass transport, and electromagnetic potential.

Linear least squares (LLS) is the least squares approximation of linear functions to data. It is a set of formulations for solving statistical problems involved in linear regression, including variants for ordinary (unweighted), weighted, and generalized (correlated) residuals. Numerical methods for linear least squares include inverting the matrix of the normal equations and orthogonal decomposition methods.

PSI-Plot is a scientific and engineering data analysis and technical plotting software developed by Poly Software International, Inc. The software can read multiple formats and perform mathematical transforms and statistical analyses. PSI-Plot is maintained on Microsoft Windows operating systems, and the current version is 9.5 for Windows 98 to Windows 7.

<span class="mw-page-title-main">Ordinary differential equation</span> Differential equation containing derivatives with respect to only one variable

In mathematics, an ordinary differential equation (ODE) is a differential equation (DE) dependent on only a single independent variable. As with other DE, its unknown(s) consists of one function(s) and involves the derivatives of those functions. The term "ordinary" is used in contrast with partial differential equations which may be with respect to more than one independent variable.

Mathematics is a broad subject that is commonly divided in many areas that may be defined by their objects of study, by the used methods, or by both. For example, analytic number theory is a subarea of number theory devoted to the use of methods of analysis for the study of natural numbers.

Probabilistic numerics is an active field of study at the intersection of applied mathematics, statistics, and machine learning centering on the concept of uncertainty in computation. In probabilistic numerics, tasks in numerical analysis such as finding numerical solutions for integration, linear algebra, optimization and simulation and differential equations are seen as problems of statistical, probabilistic, or Bayesian inference.

References

  1. "MLAB: An Advanced System for Mathematical and Statistical Modeling". Civilized Software, Inc. Retrieved 2015-08-27.
  2. Knott, G. D. (1993). "MLAB: An Advanced System for Mathematical and Statistical Modeling". In Schuster, S.; Rigoulet, M.; Ouhabi, R.; Mazat, J.-P. (eds.). Modern Trends in Biothermokinetics. New York: Plenum Press. pp. 451–454. doi:10.1007/978-1-4615-2962-0_70. ISBN   978-1-4615-2962-0.
  3. "Chemical Kinetics: Simple Binding: F + G ⇋ B" (PDF). Civilized Software, Inc. Retrieved 2015-09-01.