Error Messages in Numerical Calculations


When Mathcad cannot properly evaluate an expression, it returns an error. Errors in a worksheet are highlighted in a different color (usually red), and clicking on the expression displays an error message.

Error messages can sometimes cover the part of the calculation in error. You can press [Esc] to close an error message or use the mouse to drag the message out of the way.


All evaluations resulted in either an error or a complex result.

When displaying a 2D graph, Mathcad only plots the real value of each data point. If the expression you are plotting has no real result, the graph returns an error.


All the elements in the vector cannot be the same.

When using a fitting function, the vector of x values must contain at least two distinct values.


All values must be either scalars or strings.

The array operation you're performing requires that some or all of the elements be of the same type, either scalars or strings:


Arguments in function definitions must be names.

The indicated function definition contains an invalid list of arguments. A valid function definition begins like this:

function name (argument list) := ...

The argument list must be a name or a list of names separated by commas. Any other expression is illegal.

You see this error message if you create an invalid list in another context, for example, in the list of y-axis expressions for a plot.


Array has an incorrect number of rows and columns.

You have attempted to perform an operation on a non-existent row or column.


Array must have at least two rows to represent at least two colors.

When saving an array as a colormap, each row in the array corresponds to a different color. In order to vary a surface between two colors, the colormap must contain two rows of color data.


At least one limit must be infinity.

When using the 'Infinite Limit' integration method, at least one of the limits on the integral must be positive or negative infinity.

To change the integration routine to something other than 'Infinite Limit,' right-click on the integral and choose another routine from the menu.


This calculation does not converge to a solution.

The expression you have entered does not converge to a solution using the iterative solver you are applying. This message can be thrown by any operator or function which uses successive approximation, such as integration, regression functions, or other iterative methods, such as root finding. You can try better guess values, breaking the expression into different regions to avoid discontinuities, or reducing the value of TOL.


Can't converge to a solution. Encountered too many integrator steps.

The algorithm for this differential equation solver did not find a solution. You can try changing your guess values for the unknown initial conditions, although there may be no solution for the boundary values you provided. You can also select another algorithm, which may converge to a solution.


Can't evaluate this expression. A final or intermediate result is too small to represent.

Because of limitations in representing numbers in a computer, numbers that are too small cannot be represented. Sometimes, especially in a complicated calculation, the problem may lie with an intermediate result. When Mathcad encounters such a number, it returns an underflow error.


This expression cannot be evaluated. It may have resulted in an overflow or infinite recursion.

This function definition may contain too many nested functions. Or, if the function is defined in terms of itself, it may result in an infinite recursion. For example, if you define a function such as:

f(x):=f(x)+5

and evaluate it by typing:

f(10)=

this message appears.

To avoid this problem, be careful when redefining a function in terms of itself.


Can't evaluate this function when its argument is 0.

This function is undefined at zero.


Cannot find expression for highest order derivative, and other ODE/PDE errors.

ODE and PDE solvers try to return specific information about why they were unable to numerically solve your problem. These errors are caused by problems that are not formatted the way Mathcad expects or which are missing required information. See ODEsolve and command-line ODE solver Help for more information.


Can't find a solution to this system of equations.

Sometimes the solver fails to converge on a solution. This happens when the difference between successive approximations to the solution is greater than TOL and:

Make sure there really is a solution. Then try:


Can't find the data file you're trying to use.

The worksheet cannot find the data file or other type of file you are referencing. Make sure the file exists in the location you've specified.

If you are using a function such as READPRN or WRITEPRN, make sure you typed the argument as a pathname to the data file.


Can't have more than one array in a contour plot.

You entered more than one array in the placeholder of a contour or surface plot. You can only have one array at a time in that placeholder because contour and surface plots can only represent a single surface at a time.


Can't perform this operation on the entire array at once. Try using 'vectorize' to perform it element by element.

One of the arguments to a function or operator in the expression is a vector or matrix, instead of a scalar. You see this message if you try to divide one vector by another, since the division operator only works with scalars.

If you want to apply a function or operator to every element in a vector or matrix, use the vectorize operator.


Can't raise an expression having units to a complex power.

You can only raise an expression with units to a real power. If you want to raise an expression with units to a complex power, you must use the SIUnitsOf function to cancel out the units.


Can't solve a system with this many equations.

You cannot have this many equations in a solve block. You can solve nonlinear systems of up to 200 variables and linear systems of up to 500 variables.


Can't understand something in this data file. If this file came from a spreadsheet, make sure you saved it as ASCII text only.

The file you are trying to access with READPRN does not have the required format:

If the file has the required format and you continue to see this error, try removing any text from the file.


This range variable must be defined with sequential values.

You defined a range variable with a range that could not be understood. When you define a range, you must use one of the following forms:

Rvar := n1 ..n2

Rvar := n1,n2 ..n3

You can use at most one comma and one semicolon in the definition of a range for a range variable. If you use the second form, the value of n2 must lie between the values of n1 and n3, but cannot equal n1.


Can't use a range variable in a solve block.

Range variables cannot be used within a solve block. If you want to iterate the solution to a solve block, define the output of the block as a function of one of the solve block parameters, such as a guess value, and use a range variable or program loop to iterate that function.


The exponentiation operator requires a constant exponent when applied to a value with units.

The nth root operator requires a constant radical when applied to a value with units.

The order of the derivative must be a constant when this operator is applied to an expression with units.

The determinant operator requires a square matrix of unitless values. This matrix has elements of the form: <unit>.

To unit balance an exponent, nth-root, or derivative equation, the units of the result must depend only on the units of the arguments, not on the numeric value of the arguments. Explicit (constant) values must be used to calculate the powers of a quantity with units. This means you cannot assign the exponent, radical, or order of the derivative with a function argument, or a variable name defined in the worksheet.

Since the units of the determinant of a matrix depend upon the size of the matrix, only unitless values are accepted here.


This exponent must have a larger fractional part to be applied to a value with units.

This radical is too large to be extracted from a value with units.

To preserve floating point accuracy in calculations with units, Mathcad restricts exponents of united values to rational fraction with denominators no larger than 60,000. The same rules applies in inverse to the radicals of nth roots.


No value occurs more than any others.

Mathcad cannot determine the mode of this data. No single value occurs more frequently than any others.


Multimodal - more than one value occurs at the highest frequency.

Mathcad is unable to return the mode of the data because the data is multimodal. More than one value occurs at the highest frequency.


Cannot evaluate this accurately at one or more of the specified values.

You tried to evaluate a function at a value outside its range of accuracy.

This error occurs in cases such as evaluating sin(10100). Since the value of sin(10100) depends on the ones digit of 10100, any value that comes back would have no significant digits. Instead of seeing a value of dubious accuracy, Mathcad returns an error.


Cannot interpolate 3-D scatter data. All points lie in a line.

The data you are attempting to graph represents a line, rather than a plane. Pass your data as an array, rather than a series of vectors.


The order of the derivative must be between 0 and 5.

Mathcad can only numerically evaluate derivatives up to 5th order. In order to evaluate a derivative of order greater than 5, you must do so symbolically.


Could not find a solution.

A solution could not be found. If you're using a built-in function, check its documentation to make sure you are using the function correctly. It is possible, however, that no solution exists.


Could not find a solution because the root finder failed.

Results from some differential equation solvers require iteration. If, after many successive iterations, estimates still differ substantially, you'll see this error message. Try using different guess values.


Could not find a solution. Encountered too many iterations.

The function has passed through as many iterations as possible trying to find a solution. If you see this message when using the polyroots function, the degree of the polynomial may be too high. Try solving for the roots symbolically.


Cross product is defined only for vectors having exactly three elements.

The vector cross product is defined only for vectors having three elements.


Degree of the polynomial must be between 1 and 99.

The vector passed to the polyroots function must have at least two elements and no more than ninety-nine.


Derivatives of this order are not allowed.

Mathcad does not allow time derivatives of second order or higher, or spatial derivatives of third order or higher, when solving a PDE.


Dimensioned ranges must specify the second value in the range.

Range variables that have units associated with the values in the range must have an explicit step size, specified by putting the second value in the range definition. This prevents ambiguity when using units that are different from the base unit in the current worksheet system.


Encountered a file I/O error.

Mathcad was not able to properly read in data from a data file. Check that you are not trying to read data points that do not exist in the file.


Encountered a floating point error.

You are evaluating a function at a point that is not allowed. For example, the fifth argument to the relax function in Mathcad cannot have zeros in the non-boundary positions of the coefficient matrix.


Error in initial conditions.

This error occurs when your initial conditions do not match the expressions for functions in an ODE or PDE solve block. There may be too few or too many initial conditions, or the values specified may not match the functions.


Error in ODE Block

Mathcad has encountered an error in your ODE solve block. This error may be due to one of several factors:


Found a number with a magnitude greater than 10^307 while trying to evaluate this expression.

Because of limitations inherent in representing floating-point numbers with a computer, Mathcad cannot accurately sign floating-point numbers of magnitude greater than 10307. When an evaluation involves such a large number, even as an intermediate result, Mathcad returns this error message.


Found a singularity while evaluating this expression.

You evaluated a function or performed an operation at an illegal value. This error generally occurs when you either divide by zero or try to invert a singular matrix.


This range variable is not referenced in the left hand side of the definition - or - Illegal context.

The most common causes of this error message are:


These values can not be compared.

You have attempted to compare two values which cannot be compared, such as a complex and a real number, or a scalar and a string. Mathcad's comparison operators require a comparison between two values of the same type.


Incorrect number of knots.

The number of knots in this function are incorrect.

Unlike other spline interpolation functions, the Bspline function requires you to specify the knots — values where the polynomials fit together. This function does not have the correct number of knots given the number of individual piecewise polynomial fits specified.


Inputs cannot be single-valued.

The input vector cannot be constant. There must be at least two unique elements of the vector.


Loess cannot extrapolate.

You are trying to use loess to interpolate on a value larger than the maximum value in your data set. You must interpolate for values that lie between your data points.


The number of matrix rows must be greater than or equal to the number of columns.

The argument to the svd function must be an m x n array, where m ≥ n.


Matrix is singular. Cannot compute its inverse.

This matrix must be neither singular nor nearly singular. A matrix is singular if its determinant is equal to zero. A matrix is nearly singular if it has a high condition number.


Matrix must be positive definite.

This error appears when the matrix argument to a function must be positive definite and it is not.

A matrix is positive definite only if all its eigenvalues are real, positive scalars. In the example below, R is positive definite but M is not.

The matrix R is positive definite; the matrix M is not.


Must be a vector of real elements.

This vector must contain all real elements. No complex or imaginary elements are allowed.


Must have more than four rows and/or columns.

The input matrix for multigrid must be a square matrix with at least five rows and columns.


Must have one or two columns.

The first matrix argument in the cubic spline functions must have either one or two columns. Two columns are necessary for multivariate cubic spline interpolation.


No 'Given' found to open this solve block.

This error marks a solving function such as Find or Odesolve with no matching 'Given.' A solve block must begin with a region containing only the word 'Given.'


Not enough memory for this operation.

There is not enough memory to complete this computation. Try to free up some memory by making the array or matrix smaller (approximately 8 bytes of memory are used per matrix element) or by deleting any large bitmaps, arrays, or matrices.


Only positive values are allowed here.

This value cannot be zero or a non-negative scalar. If you're using a built-in function, check its documentation for more information on its arguments.


Primitive lists can only be displayed in a surface plot.

Uniform polyhedra can only be graphed in a 3D surface plot. Use the 3D Plot Format dialog to change the Display As setting to "Surface Plot."


The number of rows - 1 must be a power of 2.

In certain situations, Mathcad places restrictions on the size or characteristics of an argument to a function. In this case, the array specified does not have a number of rows equal to 2n + 1.


Something is wrong with the solve block used to define the function.

This is a general error returned by Mathcad when the solve block is not properly constructed. Some causes of this error are:


String contains the wrong number or the wrong kind of characters.

When performing mixed integer programming (where you force a result to be an integer or a binary number), there must be as many characters in the string argument as there are variables being solved for. The characters must be either "I" for integer, "B" for binary, or "C" for any continuous real number.


The base must be positive and real.

Logarithms can only be calculated using a positive, real scalar for the base. The base you have specified is either not positive or not real.


The elements in this vector must be in increasing order.

The values in this vector must be in ascending order.

The first argument of lspline, pspline, cspline, linterp, and hist, as well as the second argument of interp, must be a vector whose elements are strictly increasing.


The Excel component cannot accept complex data.

You cannot pass complex numbers to an Excel component. Use the Re function to remove the imaginary parts of any data you are passing to an Excel component.


The expression to the left of the equal sign cannot be defined.

Something other than a legally definable expression is on the left side of this definition. You can place any of the following on the left side of a definition:

Any other expression is illegal. If you want to compute a result instead of defining a variable, press =.


The format of this vector is invalid.

Some functions require an argument that is the result of another function. Even though this argument is just a vector, it must be in a special format that only another function can create.

For example, the first argument to interp must be a vector generated from a spline function.


The function values on the end points must be of opposite signs.

With the bracketed version of the root function, the third and fourth arguments determine the interval over which Mathcad solves for a local root. When you use the bracketed form of root, the value of the function at the first bracket must be the opposite sign of the value at the second bracket. For example:

f(x):=sin(x+10)

x:=1

root(f(x),x,1,8)

gives an error because f(1) = -1 and f(8) = -.751. Try graphing the function to see where the root might lie and use values to the left and right as brackets. In the example above, you could evaluate over the interval [1,5] instead, since f(5) = .65.


The number of guess values must be 3.

The fitting function used requires a three-element vector of guess values, whose elements correspond to the coefficients a, b, and c of the model function.


The number of rows must be a power of 2.

This error marks a wavelet transform whose argument has the wrong number of elements. The argument must be a vector with 2n elements.


Polyhedron number must be between 1 and 80, preceded by a '#'.

The polyhedron number code you specified does not match any known polyhedron.

When using either the Polyhedron or PolyLookup functions, you can specify a uniform polyhedron either by its name, number code, or Wythoff number. When specifying the number code, you must do so as a string, where the first character is '#'.


The unit placeholder can only have real, non-zero scalars put into it, or a function of one variable with a defined inverse.

You entered an illegal expression in the placeholder at the end of a calculation equation. This placeholder requires real, non-zero, scalar values or expressions, or a function of a single variable with a defined inverse for scaling or affine unit transformations.


There are too many commas in this expression.

In Mathcad, commas are used to separate:

Any other uses of a comma result in an error. For example, you cannot use commas in a number, such as 4,000. You should simply type 4000.


There must be at least as many data points as parameters.

The fitting function does not have enough data points for the parameters specified. This error occurs in one of three cases:

You can use the rows function to determine the length of a vector.


There must be more than three data points.

Localized polynomial regression with the loess function requires data vectors longer than three elements.


These array dimensions are incompatible.

The array operation or function used requires arrays of specific dimension. Some examples of this include:

Check the documentation on the particular operator or function for any array size requirements.


This value must be a function.

This argument must be the name of a function, but it is not.

Certain functions in Mathcad require as input other functions. For example, the matrix function requires three arguments: the number of rows and columns for the resulting matrix, and the function used to determine the elements of the matrix.


This value must be a scalar or an array.

Mathcad was expecting a value, but was provided something else, such as a function or a range variable. This error occurs, for example, if you create a definition that involves a range variable on the right side of the definition but the range variable does not appear on the left side. If you define p:=0..4 then f:=p+2 gives this error because the addition operator is expecting individual values, not a range. Instead define f(p):=p+2 or fp:= p + 2.


This value must be either 0 or 1.

Some of the finance functions accept an optional argument, type, which specifies when a payment is made within the period. type can be either 0 or 1.


This array has too many subscripts. Use only one subscript for a vector or two for a matrix.

This expression references a vector or matrix with more than the allowable number of subscripts.

Mathcad only allows the use of two-dimensional arrays. To refer to the elements of a nested array, you must subscript the element containing the nested array, such as:

(M5,3)2,1


This array index is invalid for this array.

This expression uses a subscript or superscript that refers to a nonexistent array element. A valid subscript or superscript must be:


This array must have more than one row or column.

You performed an operation that requires a matrix. For example, when creating surface plots or contour plots, the array plotted must be a matrix, an array having at least two rows or two columns. Certain built-in functions also require matrix arguments.


This '(' requires a matching ')'.

The indicated ( is not matched by a balancing ). You must add a matching ) to complete the expression.


An operator is required here.

The operator placeholder in this expression is empty. You must insert an operator into the indicated placeholder before Mathcad can evaluate the expression in which it occurs.

This error generally occurs when you have deleted an operator.


This file could not be opened. Make sure it exists.

The data file or other external file you are trying to import is not found or a data file you are trying to write to is read-only.

Make sure you've specified the path to the file correctly and that the file exists there. Also verify that the file is not read-only. Keep in mind that you must specify the full path to a file unless the file is located in the program folder.


This function accepts a variable number of arguments, so it cannot be passed as an argument.

A function with a variable number of arguments, such as mean or stdev, cannot be passed as an argument to another function. Define a new version of the function, such as

mean1(x):=mean(x)

and use the new version as your argument.


This function is unavailable; it is implemented in an extension pack that is not installed or for which a license is unavailable.

This function is not part of Mathcad, but rather is provided through optional add-on software called an extension pack. The particular extension pack Mathcad is attempting to use is indicated by the code at the end of the error message, which can be interpreted by Technical Support.

Mathcad licenses four extension packs for sale separate from Mathcad: Data Analysis, Image Processing, Signal Processing, and Wavelets. These extension packs are available for separate purchase from the Web Store.

To resolve this error, you must either purchase the proper extension pack, or use another function in your worksheet.


This function is undefined at one or more of the specified points.

You attempted to evaluate an operator or a function at an inappropriate value. For example, ln(0) gives this error. So does -3!, since the factorial operator is undefined for negative numbers.


This function is no longer supported in the current unit system. See Help for SIUnitsOf function.

The UnitsOf function has been deprecated. It is still available in the SI Unit system, where it returns the same results as the SIUnitsOf function. Use the SIUnitsOf function going forward.


This image format is not supported.

The image reading functions such as READ_IMAGE, READ_RED, etc. can only read files in BMP, JPEG, GIF, PCX, or TGA format.


This integer is too large.

This value is too large to work with. If you're using a built-in function, check its documentation for more information.


This integer is too small.

This value is too small to work with. If you're using a built-in function, check its documentation for more information.


This is invalid. If you are using conditional statements in a Mathcad program, make sure all cases are accounted for.

When using a conditional statement, your program may not calculate properly if you do not anticipate all possible values on which the conditional depends. For example, the program below is valid only when x is 4 or 5. When x is any other value, the program does not specify what to do.

Actions are defined only for x=4 and x=5; all other values of x return an error.

To correct this, you can add an otherwise statement:

The otherwise statement defines an action for all other possible values of x.


This is not a scalar.

You used a vector or ranged expression or another kind of expression where a scalar is required. Some functions require some or all of their arguments to be scalars only. Check the documentation on the function for more information.


This is not a valid interval.

Some functions require two arguments which indicate the beginning and end of an interval. The beginning value must be smaller than the end value.

For example, the runif function requires two arguments a and b, where a and b are the endpoints and a must be smaller than b.


This is not allowed inside a solve block.

You have attempted to use a disallowed construct within a solve block.

There may be a definition within this solve block. Variables within a solve block can only be defined using a Boolean equals sign.

Or, you may have created a nested solve block — two 'Given' statements with no intervening solving function. A solve block cannot contain another solve block. As an alternative, you can define a function in terms of one solve block and use it inside another solve block. In many cases, this has the same effect.


This matrix must be square.

Some built-in functions require square matrices (matrices having an equal number of rows and columns). Check the documentation on the function for more information.


This value must be an integer. The expression you used appears to have a fractional part.

This expression contains a non-integer expression where an integer is required. The expression may have a fractional part.

Some possible places to look are:

Note that although you can define range variables with fractional values, you cannot use these as subscripts or superscripts.


This value must be a mapping function.

The fmap argument to CreateMesh or CreateSpace must be the name of a mapping function which determines the coordinate system. For example, you can use the coordinate mapping functions in this argument.


This value must be an array.

You performed an array operation on a scalar. For example, you cannot use the array column operator on a scalar.

For surface plots or contour plots, the array plotted must have at least two rows or two columns.


This operation can only be performed on a number or an array.

The function or operator you are using requires a single constant, a matrix, or a vector.


This operation can only be performed on a string.

The function or operator you are using requires a string argument. For example, string functions usually require at least one string argument.


This payment period is invalid.

The payment interval you have specified is incorrect. This is likely due to one of the following reasons:

As a rule, Mathcad assumes that the number of payments to be made (nper) is correct, and marks an argument not in agreement with nper as incorrect. When editing your equation, make sure that you have not entered an incorrect number of payments.


This subscript or superscript is too large.

The array subscript/superscript you tried to use exceeds the internal Mathcad limit. Due to issues with the representation of numbers on a computer, Mathcad does not allow you to use subscripts or superscripts greater than 16 million.


This value can only be 1, 2, or 3.

The fourth argument to bspline must be either 1, 2, or 3, indicating the degree of the individual piecewise polynomial fits used in the B-spline.


This value must be a matrix.

You are trying to perform a matrix operation on something other than a matrix. A matrix is an array consisting of more than one column.


This value must be a 2x1 matrix.

The spatial and temporal endpoint arguments to numol and Pdesolve must be in the form of two-element column vectors.


This value must be a vector.

This error marks a matrix or scalar in an operation that requires a vector (a one-column array), for example, with the vector sum operator.


This value must be an integer greater than 1.

You have specified an invalid number of gridpoints. The integer number of gridpoints in a 3D plot must be an integer greater than 1.


This value must be an odd integer.

This value must be an odd integer. Check the documentation for the function for any limitations on its arguments.


This value must be greater than or equal to 10^-16.

If you're using a built-in function, check the documentation for the function for any limitations on its arguments.


This value must be real. It cannot be imaginary or complex.

This expression contains an imaginary or complex-valued expression someplace where it is not allowed, such as a subscript or superscript, a differential equation solver, or certain functions such as mod and angle.


This vector has the wrong number of elements.

This error marks a Fourier transform function whose argument has the wrong number of elements.

Use cfft and icfft for arrays and vectors of any size.


This vector must contain at least one positive element and one negative element.

When calculating the internal or modified internal rate of return for a series of payments, the vector of payments must contain at least one positive and one negative value.


This vector must have fewer than five columns.

The first argument of the loess function should be a real matrix having no more than 4 columns, each of which represents the data corresponding to a particular factor.


This vector should have more elements.

This error message marks a Fourier transform, cubic spline, or linear interpolation function applied to a vector with too few elements.

Splines and linear interpolation require vectors with at least two elements. Fourier transform functions and their inverses require at least four elements.


TOL is set to an illegal value.

The built-in constant TOL is outside the allowable range. Redefine TOL to a value greater than 0 and less than or equal to 1.


Unable to plot this many points.

You tried to plot more points than could be handled in one plot. Try keeping the number of points below 150,000.


Cannot write to this file. Make sure it exists and is not read-only.

Mathcad was unable to write to the data file. Check that the file exists in the specified location, and that it is not read-only.


You cannot plot more than 16 traces.

You have attempted to create an X-Y or polar plot of more than 16 curves. Mathcad allows a maximum of 16 curves per 2D plot.


You must evaluate this operator symbolically.

You have tried to evaluate an expression numerically when it must be evaluated symbolically.

In Mathcad, operators such as the indefinite integral and the limit operators can only be evaluated symbolically. When using one of these operators, you must evaluate the expression using either Live Symbolics or the appropriate option from the Symbolics menu.


You interrupted calculation. To resume, click here and press F9.

You pressed [Esc] to halt a calculation. To recalculate the marked equation, put the cursor in the equation and choose Calculate > Calculate Now from the Tools menu, or press [F9].

If you want to recalculate the entire worksheet, choose Calculate > Calculate Worksheet from the Tools menu instead, or press [Ctrl] [F9].

If you find yourself frequently interrupting calculations to avoid having to wait to recalculate as you edit your worksheet, you may wish to switch to manual mode.


You must specify a starting cell for all inputs.

You are attempting to pass data to an Excel component without first mapping each input variable to a starting cell.

In order to send data from Mathcad to Excel via the Excel component, you must specify which cells in the spreadsheet correspond to each Mathcad variable. If this mapping is incomplete, Mathcad cannot properly exchange data with Excel.


Cannot understand this syntax.

Mathcad cannot make sense of this expression. Try entering it again.

This error occurs when Mathcad is unable to understand the expression you have written, but is unable to return a more specific error. Review the expression for potentially incorrect constructs, such as:


This placeholder is empty.

You have not filled in the indicated placeholder. You must fill in the placeholder with a number or expression to complete it.


A name is required here.

Mathcad was expecting the name of a function or variable at the indicated location, but found something else. For example, you may have entered something like:


This 'otherwise' must match an 'if'.

You have attempted to use an otherwise statement without preceding if statement.

The otherwise operator, analagous to the else keyword in C++, is used to identify cases which fail a conditional test during execution, usually to set an alternate value for a variable. In any case, the otherwise statement only executes in conjunction with an if statement, such as:

otherwise operator

In this case the program returns 0 for any value of x > 2 or x < −2. For values of x between −2 and 2, inclusive, the program instead returns the value of the square root.


This 'break' must occur within a loop.

You have used a break outside of a for or while loop.

break is designed to halt execution of a loop. Generally, break is used on the left side of an if statement, exiting the loop and resuming execution of the program with the statement immediately after the loop.

In the following example, break terminates the loop for values of x > 4 and moves to the next statement, which returns the current value of z.

break operator


This 'continue' must occur within a loop.

You have used a continue outside of a for or while loop.

continue is designed to skip a particular iteration of a loop, resuming execution with the next iteration. Generally, continue is used on the left side of an if statement, skipping any remaining statements in the current iteration of the loop and resuming execution with the next iteration.

For example, here continue is used to create an array with data only in the even-numbered columns:

continue causes the program to skip writing data in certain columns

When j is even, continue causes calculation to immediately skip to the next iteration, so no values are written into columns 0 or 2.


This value must be a range.

The name of a range variable was expected at the indicated position.

If the expression contains either a summation or an iterated product, check to see that the index, located beneath the operator, is in fact a range variable defined in an previous region.


This name is too long.

The name you have chosen is too long. You must pick a shorter name for this function or variable.


This string is too long.

Mathcad only allows you to type a string of at most 1024 characters. To create a longer string, break it into 2 or more shorter strings and use the concat function to concatenate them.


This number contains an invalid character.

The indicated numeric constant contains an invalid character. For example, if you accidentally type 2X you see this error.


This number is too large.

You have specified a number greater than 10307. Mathcad cannot handle a number this large.


This variable is undefined.

This variable or function is undefined. To define it, enter the name, followed by a colon (:) and the number or expression that defines it. Be sure to place the definition above those regions in the worksheet that depend upon it.

You also see this message if you use a variable incorrectly in a global definition. Variables occuring on the right hand side of a global definition must be globally defined above the definition.

Note:

This error often indicates an error in a definition further up in the worksheet. If this is the case, all dependent expressions display in red. You can use the Trace Error feature to locate the erroneous definition.


This argument is redundant.

This function has 2 or more arguments with the same name. You must rename one of them.

This is a change in behavior from earlier versions of Mathcad. Previously, Mathcad would allow you to construct the function definition: f(x,x) := x + x. This is no longer allowed; Mathcad now requires the names of a function's arguments to be distinct.


This variable reference is ambiguous.

Mathcad is unable to resolve the definition of this variable. This typically occurs when a variable and a function of the same name are used in the same expression. Use the namespace operator to resolve the definition, or rename a variable or function distinctly.


The forms of the expression and its error handler must match.
The expression has the form: <units and type>,
but the handler has the form: <units and type>.

This error occurs when the expression on the left side of an on error statement returns a result with a different type or units than the expression on the right side.

Some examples of behavior that would cause this error are:

See the information on function type signatures if you need help reading the output of this message.


This name does not refer to a function.

The name you used in an expression does not refer to a function; it refers to some other type of value.

In Mathcad, some functions require a function as input. For example, genfit requires the name of a fitting function, and the CreateSpace and CreateMesh functions require you to specify the name of a mapping function or functions.


This function requires at least <required> arguments but is applied to <actual>.

The indicated expression applies a function to fewer arguments than the function actually requires. For example, you attempted to calculate csort(A), rather than csort(A, 3). Check the argument list in the documentation, or look at the function's type signature by typing the function name followed by =.


This function accepts at most <required> arguments but is applied to <actual>.

The indicated expression applies a function to more arguments than the function actually requires. For example, you attempted to calculate atan2(0,2,0)=. Check the argument list in the documentation, or look at the function's type signature by typing the function name followed by =.


This function has the form: <actual>,
but must have the form:<required> .

This value has units: <actual>,
but must have units: <required>.

The function or operator you're using expects a different type of value than the one you used.

Mathcad supports various types of data, such as scalars, range variables, vectors and matrices, strings, values with associated units, and nested arrays. Confirm in the documentation, or by using the function's type signature, that you've supplied the proper types of arguments. Type the name of the function followed by = to see the expected types. The type information in this message uses the following syntax:

This error message will result, for example, when


The forms of the possible return values must match.
The first has the form: <units and type>,
but the second has the form: <units and type>.

This calculation contains a conditional branching expression, such as the if function, or the if or on error programming operators, whose result varies in type according to the branch taken during execution. Since Mathcad cannot determine which result is the correct one, it returns this error rather than possibly returning an incorrect result during evaluation.

A similar error occurs when an array or a 2D Plot contains different units or types in markers and axis limits. All the values must have matching units and types.


This function refers to itself inconsistently.

The call to this function is not consistent with its definition.

This error occurs in cases such as the following:


This function is no longer supported.

The function no longer works in Mathcad. The following functions are no longer supported:


Related Topics