Evaluating a Function

Functions allow you to use expressions over and over again in your worksheet without having to reenter them repeatedly.

Tutorial - Evaluating Functions

Discussion and Example

To evaluate a function, either built-in or user-defined:

  1. Type the name of the function, followed by a left parenthesis.

  2. Type a list of argument values separated by commas followed by a right parenthesis.

    f(4,2)

  3. Press the "=" operator.

    f(4,2)=4.909

If you can't remember the exact name or argument list of a built-in function, use the Insert Function list.

Applying a function to an expression

Instead of a number, you can put any valid Mathcad expression in a function's argument list. For example,

w := 2       t := 2

f(w·t, 2) = 4.909

Note:

Debugging a function call

When evaluating a function, you may get any of a variety of error messages about the domain of the arguments. Some of these are specific to the built-in functions and operators which you are using in your expression, and some of them have to do with the type signature of the function - that is, the limits on the types of the arguments given the structure of the function itself.

When trying to interpret why a function call isn't evaluating, try to trace the error or look at the type signature by typing the name of the function and =.

Related Topics