My end goal is to use LINEST to generate curve fits using rational functions (i.e. polynomial divided by polynomial).
(I assume hereafter that the independent variable x is located in column B, and the dependent y is located in column A.)
I know that if I had wanted a polynomial curve fit (let’s say of degree 6), I could have entered that quite easily as =LINEST(A2:A100, B2:B100^{1,2,3,4,5,6}) without doing any intermediary calculations.
I also know that one (workaround-ish) way of achieving the rational curve fit would be to generate, from the columns representing x and y, also the columns x^2, x^3, … and yx, yx^2, y*x^3, … and use the formula =LINEST(A2:A100, B2:J100) (or however many columns I needed to precalculate)
My question is then: Is there a way to express, in such a way that Calc understands it, that the “independent data” for the purposes of the curve fit consists not only of the array B2:B100^{1,2,3,4,5}, but also of the array A2:A100*B2:B100^{1,2,3}?
(Assuming I want a 5th order polynomial divided by a 3rd order polynomial.)
That is, how do I merge B2:B100^{1,2,3,4,5} and A2:A100*B2:B100^{1,2,3} into one array that I can feed to LINEST?
(If this is not possible, well, then I’ll add the needed auxiliary columns explicitly. I’m mostly wondering if I can do this in a neater manner.
My testing indicated that it didn’t work to give the two “independent variables” arrays to LINEST separated by comma, or semicolon; nor could I gather the two arrays with braces or brackets or square brackets. I haven’t seen any sign that CONCAT or CONCATENATE would work with arrays, but I haven’t tested that extensively. Beyond that, I am out of ideas.)
Thanks, and sorry for the length of the background section.
[The version of the software is 7.2.6.2, Gentoo Official.]