What's the best way to find the intersection of two polynomial arrays, preferably in a user defined function so that I don't have to use lots of cells on a worksheet? Specifically, I have two x,y arrays, one which slopes from bottom left to upper right, the other that slopes from upper left to bottom right. I thought I'd use the LINEST function to find the polynomial coefficients of each array (m1, m2, ..., mn), and iterate to find the "predicted" y value based on assumed x for each array until both y values are within some reasonable error.
The second part of this problem is, I can't get teh LINEST function to work in a user defined formula in VB for a polynomial to find the polynomial coefficients (m1, m2, ...mn). I think I'm having a problem with the use of brackets, as shown below:
Temp = Application.WorksheetFunction.LinEst(y, x^{1,2,3})
m1 = Application.WorksheetFunction.Index(Temp,1,1)
m2 = Application.WorksheetFunction.Index(Temp,1,2)
m3 = Application.WorksheetFunction.Index(Temp,1,3)
mn= Application.WorksheetFunction.Index(Temp,1,n)
Or, should I be using a regression formula to find the intersection of these two arrays?
Bookmarks