Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Numeric Functions

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Use the Numeric functions to create and perform arithmetic and complex mathematical operations on numbers and to convert numbers from one data type to another. Use the VIs and functions on the Elementary and Special Functions and VIs palette to perform trigonometric and logarithmic functions. Example

The functions on this palette can return general LabVIEW error codes.

Palette ObjectDescription
Absolute ValueReturns the absolute value of the input.
Add Array ElementsReturns the sum of all the elements in numeric array.
AddComputes the sum of the inputs.
Compound ArithmeticPerforms arithmetic on one or more numeric, array, cluster, or Boolean inputs. Select the operation (Add, Multiply, AND, OR, or XOR) by right-clicking the function and selecting Change Mode from the shortcut menu. The default mode depends on the palette from which you drop this function.
DecrementSubtracts 1 from the input value.
DivideComputes the quotient of the inputs.
Enum ConstantUse the enumerated constant to create a list of string labels with corresponding integer values you can select on the block diagram.
Expression NodeUse the Expression Node to calculate expressions, or equations, that contain a single variable. The following built-in functions are allowed in formulas: abs, acos, acosh, asin, asinh, atan, atanh, ceil, cos, cosh, cot, csc, exp, expm1, floor, getexp, getman, int, intrz, ln, lnp1, log, log2, max, min, mod, rand, rem, sec, sign, sin, sinc, sinh, sizeOfDim, sqrt, tan, tanh.
IncrementAdds 1 to the input value.
Multiply Array ElementsReturns the product of all the elements in numeric array. If numeric array is an empty array, the function returns a value of 1. If numeric array contains only one element, the function returns that element.
MultiplyReturns the product of the inputs.
NegateNegates the input value.
Numeric ConstantUse the numeric constant to pass a numeric value to the block diagram. Set this value by clicking inside the constant with the Operating tool and typing a value.
Quotient & RemainderComputes the integer quotient and the remainder of the inputs.
Random Number (0-1)Produces a double-precision, floating-point number between 0 and 1, exclusively. The distribution is uniform.
ReciprocalDivides 1 by the input value.
Ring ConstantUse the ring constant to create a list of value pairs you can select on the block diagram. Each value pair consists of a numeric value and corresponding string label.
Round To -InfinityTruncates the input to the next lowest integer.
Round To +InfinityRounds the input to the next highest integer.
Round To NearestRounds the input to the nearest integer.
Scale By Power Of 2Multiplies x by 2 raised to the power of n.
SignReturns the sign of number.
Square RootComputes the square root of the input value.
SquareComputes the square of the input value.
SubtractComputes the difference of the inputs.


SubpaletteDescription
Complex FunctionsUse the Complex functions to create complex numbers from two values given in rectangular or polar and to break a complex number into its rectangular or polar components.
Conversion VIs and FunctionsUse the Conversion VIs and functions to convert data types.
Data Manipulation FunctionsUse the Data Manipulation functions to modify the data types used in LabVIEW.
Math & Scientific ConstantsUse the Math & Scientific Constants for creating LabVIEW applications. Some of the constants on this palette have units.
Scaling VIsUse the Scaling VIs to convert voltage readings to other temperature or strain units.

Example

Refer to the labview\examples\general\structs.llb for examples of using the Numeric Functions.

 


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit