Mathcad Functions
Mathcad Functions
You can insert any built-in function by choosing Function from the Insert menu to open the Insert Function dialog box. You may also type the names of the built-in functions directly into Mathcad. Spelling and capitalization are important.
Trigonometric Functions cos, cot, csc, sec, sin, sinc, tan Calculate the standard trigonometric quantities for arguments in radians. Inverse Trigonometric Functions acos, acot, acsc, asec, asin, atan Calculate the inverse trigonometric quantities. Data analysis functions mean, median, gmean, and hmean Arithmetic, geometric, and harmonic means. Characteristics of an Array cols, rows size of a matrix length, last size of a vector max, min maximum and minimum values in an array
sinc(z) is a special function which correctly evaluates sin(z)/z = 1 in the limit as z approaches 0.
Arguments:
Notes:
Sin(x)/x as x approaches 0 returns 1 when x is used as the argument to sin and as the denominator in the fraction, or if the same function f(x) = 0 is used as both argument and denominator. In the case where g(x) = sin(x) and f(x) = x, g(x)/f(x) returns 0, following the normal Mathcad rules for the fraction 0/0. If you wish to
guarantee you get the correct behavior, use sinc. Trig functions are subject to roundoff errors in the following cases:
For large arguments, >10 in magnitude, trig functions begin to lose precision. When this happens, you see the error message "Cannot evaluate this accurately at one or more of the points specified." The tan function has singularities, and is undefined at odd-integer multiples of /2. Arguments near these singularities are subject to precision errors. The value of on a computer is only an approximation, so arguments to the trig functions near multiples of can only be an approximation of the correct value. If you need more exact values, use symbolic evaluation with a decimal point, to force floating point calculations.
12
mean(A, B, C, ...) Returns the arithmetic mean, or average, of A, B, C, ... by summing all
elements in the arguments and dividing by the total number of elements.
median(A, B, C, ...) Returns the median of the elements in A, B, C, ... , the value above and below which there are an equal number of values. gmean(A, B, C, ...) Returns the geometric mean of A, B, C, ... defined by
A, B, C, ... are m x n arrays or scalars. The arithmetic mean accepts complex and
negative values, while the geometric and harmonic means accepts only positive real numbers. The median function accepts only real values.
Notes:
If there are an even number of values, the median is the arithmetic mean of the two central values. The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals.