I would like to accomplish in PHP something that easily done in Excel.
I have an array of data, I would like to calculate the Logarithmic trenline in order to graph it late ron.
I have found out that the equation of a logarithmic trendline is calculated in Excel using the following formulat:
Equation: y = (c * LN(x)) - b
c: =INDEX(LINEST(y,LN(x)),1)
b: =INDEX(LINEST(y,LN(x)),1,2
)
How can I calculate b and c in PHP? I have not been able to find an equivalent of the INDEX and LINEAR function that is available in Excel.
Can ayone help me with that?
Start Free Trial