A note about function definitions MathCad Help

When you define a function, Mathcad does not try to evaluate it until you use it later on in the worksheet. If there is an error, the use of the function is marked in error, even though the real problem may be in the definition of the function itself. Figure 7-14 shows two examples of this.When a user-defined function is marked in error, be sure to check the function definition to find the actual source of error. Note that the second example in shows a recursive definition generating a “stack overflow” error message. Although Mathcad supports recursive function definitions, as described in “Recursive function definitions” on page 136, you must supply an initial condition in your function definition that prevents the recursion from going on forever.

Figure 7-14: When an error message points to afunction, go back and check the way the function was defined.

Figure 7-14: When an error message points to afunction, go back and check
the way the function was defined.

Posted on November 21, 2015 in Equations and Computation

Share the Story

Back to Top
Share This