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

    Syntax

    SUB(A1; A2) 

    Arguments

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

    Result

    If both arguments are scalar values, the result is a scalar value.
    If at least one of the arguments is an array, the result is also an array. The size of the result is equal to the size of the input array.
    If both of the arguments are arrays, the size of the result is equal to the size of the smallest input array.

    Description

    Each element of the result is the difference between the corresponding elements of the input arguments. 

    Example 1:

    Expression: SUB(arg1; 5)

    arg1 5 7 3 2
    result 0 2 -2 -3
     
    Example 2:

    Expression: SUB(arg1; arg2)  
    arg1 5 7 3 2
    arg2 4 6 6 0
    result 1 1 -3 2
     
    Example 3:

    Expression: SUB(0; arg1)  

    arg1 5 7 3 2
    result -5 -7 -3 -2

    Related Examples

    Windows Forms: Data Manipulation\Functions\Basic Functions