Basic math calculators
The SPECIAL menu contains several utility routines useful in respirometry (STP conversion, altitude and pressure calculations, a metabolism estimates routine, a routine to compute ventilation) and a simple calculator.   For convenience they can be activated from the main plot window by typing specific keys, indicated by ‘key’ on the menu.

  •   SIMPLE MATH CALCULATOR...     This is an elementary math calculator (addition, subtraction, multiplication, division) with a few frequently-used functions (logs, square roots, etc.) and some specialized keys for interchanging time units (division and multiplication by 60 and 24).  If you have obtained a mean value with an ANALYZE menu operation, you can transfer that mean to the calculator for additional manipulation (note that this does not work for regression slopes).  The 'store X value...' button lets you save the result for use as a scaling factor in subsequent ANALYZE operations.  Clicking this button opens the scaling factors window.  Click on any channel's "*" or "÷" button, and the current X-value will appear in the first edit field (the multiplication or division factor) for that channel.

    • The initial X value will be set to the last computed value obtained from several of the calculators (STP, metabolism, etc.).   If no such value is available (i.e., no calculators have been used), the initial X value is set to 1.0.

    • Mathematically impossible operations (such as attempting to take the square root of a negative number) will generate a warning notice (this calculator only deals with real numbers).

    For addition, subtraction, multiplication, and division the calculator works in a simple RPN mode.  Enter the first number in the X-value edit field, hit 'return' and enter the second number, and then hit the '+', '-', '*', or '/ ' key.  Note that for performing subtraction in RPN, the ‘_’ (underline) key is substituted for the '-' (minus) key.    The result appears in the X-value field.


  •   EXPRESSION EVALUATOR...     This routine lets you write a mathematical expression, enter numeric values for the expression variables, and have the computer solve it. The program parses the expression into components and performs the operations. The expression evaluator understands the following symbols (upper or lower case entries are OK):

    Some general considerations:

    NOTE: This routine will only 'catch' errors in the basic numeric expression. It may not detect invalid or meaningless math operations that may be attempted when data are processed, such as division by zero, or taking the log or a non-integer exponent of a negative number. If such situations occur, results may be unpredicatable. The algorithm does find most such errors during processing, however.

    The underlying code for the expression evaluator was developed by the late, great Robert Purves (recently deceased and greatly missed).  I 'borrowed' it - with his permission - and made some modifications for LabAnalyst.  But Robert P. deserves all the credit.


    Other links: