Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
me
 
Posts: n/a
Default How do I create a worksheet function for polynomial data fit

I am trying to get a data fit (x,y) to y=ax2+bx+c using worksheet function.
If you could help me, I would appreciate very much. PS. I don't want to use
excel's matrix functions.

Thanks
  #2   Report Post  
FabricProfile
 
Posts: n/a
Default

Assuming you are looking to find the coefficients from a data set, you can
use the function "LINEST". For two columns of data (x in A column and y in B
column) and assuming 10 points of data (A1:B10):

Select 3 contiguous cells in a row. (i.e. C3:F3). Enter the following formula:

=LINEST(B1:B10,(A1:A10)^{1,2})

Press Ctrl-Shift-Enter. (Press these together or it won't work). Selecting
Cells C3:F3 afterwords and then clicking on the formula displayed above will
highlight the selected "X" and "Y" cells. You can drag the bottom right
corner of each area to include more or less data as desired. If LINEST covers
empty cells it will not work.

The other way is to use the X-Y graphing function, adding a trendline and
then displaying the equation. Add trendlines by right clicking the graphed
data set. Right-clicking on the displayed equation gives you the ability to
change the format to a number and increasing the values past the decimal to
increase accuracy of the equation. LINEST does this automatically without
needing a graph.

C3 will have the A value, D3 will have the B value and F3 will be C.

"me" wrote:

I am trying to get a data fit (x,y) to y=ax2+bx+c using worksheet function.
If you could help me, I would appreciate very much. PS. I don't want to use
excel's matrix functions.

Thanks

  #3   Report Post  
me
 
Posts: n/a
Default

Thank you. I spent one whole day and trying to solve the problem using
matrixes and least square method. Thanks again

"FabricProfile" wrote:

Assuming you are looking to find the coefficients from a data set, you can
use the function "LINEST". For two columns of data (x in A column and y in B
column) and assuming 10 points of data (A1:B10):

Select 3 contiguous cells in a row. (i.e. C3:F3). Enter the following formula:

=LINEST(B1:B10,(A1:A10)^{1,2})

Press Ctrl-Shift-Enter. (Press these together or it won't work). Selecting
Cells C3:F3 afterwords and then clicking on the formula displayed above will
highlight the selected "X" and "Y" cells. You can drag the bottom right
corner of each area to include more or less data as desired. If LINEST covers
empty cells it will not work.

The other way is to use the X-Y graphing function, adding a trendline and
then displaying the equation. Add trendlines by right clicking the graphed
data set. Right-clicking on the displayed equation gives you the ability to
change the format to a number and increasing the values past the decimal to
increase accuracy of the equation. LINEST does this automatically without
needing a graph.

C3 will have the A value, D3 will have the B value and F3 will be C.

"me" wrote:

I am trying to get a data fit (x,y) to y=ax2+bx+c using worksheet function.
If you could help me, I would appreciate very much. PS. I don't want to use
excel's matrix functions.

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VBA to create a new worksheet, and then target new worksheet brianproctorla Excel Discussion (Misc queries) 1 September 27th 05 12:50 AM
Offset function referencing worksheet Jeff Excel Discussion (Misc queries) 1 September 11th 05 07:01 PM
INDIRECT Function impact on Copy Worksheet BG Excel Worksheet Functions 5 July 13th 05 02:29 AM
Create a list in one worksheet of the other worksheets' names Kelli Excel Worksheet Functions 0 July 7th 05 08:45 PM
How do I use 3 cells to create the string for a lookup function? Bencomo Excel Worksheet Functions 1 May 15th 05 07:17 AM


All times are GMT +1. The time now is 06:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"