Spread Windows Forms 17
GrapeCity.Spreadsheet Assembly / GrapeCity.Spreadsheet Namespace / WorksheetFunction Class / Trend Method
Known_y's - the set of y-values that you already know in the relationship y = mx + b.
Known_x's - an optional set of x-values that you may already know in the relationship y = mx + b.
New_x's - new x-values for which you want Trend to return corresponding y-values.
Const - a logical value specifying whether to force the constant b to equal 0.
The context worksheet to calculate.
The context row to calculate.
The context column to calculate.


In This Topic
    Trend Method
    In This Topic
    Gets values along a linear trend. Fits a straight line (using the method of least squares) to the arrays known_y's and known_x's. Gets the y-values along that line for the array of new_x's that you specify.
    Syntax
    'Declaration
     
    
    Public Function Trend( _
       ByVal knowY As Object, _
       Optional ByVal knowX As Object, _
       Optional ByVal newX As Object, _
       Optional ByVal constant As Object, _
       Optional ByVal worksheet As IWorksheet, _
       Optional ByVal contextRow As Integer, _
       Optional ByVal contextColumn As Integer _
    ) As Object
    'Usage
     
    
    Dim instance As WorksheetFunction
    Dim knowY As Object
    Dim knowX As Object
    Dim newX As Object
    Dim constant As Object
    Dim worksheet As IWorksheet
    Dim contextRow As Integer
    Dim contextColumn As Integer
    Dim value As Object
     
    value = instance.Trend(knowY, knowX, newX, constant, worksheet, contextRow, contextColumn)

    Parameters

    knowY
    Known_y's - the set of y-values that you already know in the relationship y = mx + b.
    knowX
    Known_x's - an optional set of x-values that you may already know in the relationship y = mx + b.
    newX
    New_x's - new x-values for which you want Trend to return corresponding y-values.
    constant
    Const - a logical value specifying whether to force the constant b to equal 0.
    worksheet
    The context worksheet to calculate.
    contextRow
    The context row to calculate.
    contextColumn
    The context column to calculate.
    See Also