Xceed Chart for WinForms v4.4 Documentation
Welcome to Xceed Chart for WinForms v4.4 / User Guide / Data Manipulation / Functions / Add
In This Topic
    Add
    In This Topic

    Syntax

    ADD(A1; A2 [; A3] ...)

    Arguments

    Accepts two or more arguments, which may be either scalar values or arrays.

    Result

    If all the arguments are scalar values, the result is a scalar value.
    If at least one argument is an array, the result is an array. The size of the result is equal to the size of the input array.
    If more than one argument is an array, the size of the result is equal to the size of the smallest input array. 

    Description

    Each element of the result is a sum of the corresponding elements of the input arguments 

    Example 1: (two scalar constants) 

    Expression: ADD(2.5 ; 6.1)
    Result: 8.6 

    Example 2: (array and scalar constant) 

    Expression: ADD(arg1; 10) 

    arg1 5.8 3.2 1.0 6.9 11.0
    result 15.8 13.2 11.0 16.9 21.0

    Example 3: (two arrays with equal sizes) 

    Expression: ADD(arg1; arg2)

    arg1 5.8 3.2 1.0 6.9 11.0
    arg2 2.1 6.6 5.9 1.3 1.4
    result 7.9 9.8 6.9 8.2 12.4

    Example 4: (three arrays, with different sizes) 

    Expression: ADD(arg1; arg2; arg3)

    arg1 2.1 6.6 5.9 1.3 1.4
    arg2 4.0 2.1   3.0

     

     

    arg3 1.5 2.0 2.0 2.4

     

    result 7.6 10.7 10.9

     

     

    Related Examples

    Windows Forms: Data Manipulation\Functions\Basic Functions