Hi, there
Does anyone have the code to get a best fit plane in VBA?
Thanks.
Best regards,
Lily
Hi, there
Does anyone have the code to get a best fit plane in VBA?
Thanks.
Best regards,
Lily
Last edited by SpringLily; 01-13-2011 at 04:21 AM.
Best-fit plane to a bunch of points {x,y,z}? You can use LINEST to regress z=ax+by+c. Post a workbook if you need help.
Entia non sunt multiplicanda sine necessitate
Thanks, shg. Please see the attached.
Like this:
Note that (1) D15:F15 is an array formula, (2) the coefficients appear in the order opposite the arguments in LINEST, and (3) it's not a great fit.Please Login or Register to view this content.
Thanks, shg. Are you happy to send me the Spreadsheet with formula in. Best regards, Lily.
In your workbook, select D15:F15
Paste =LINEST(F7:F12, D7:E12) in the formula bar, but DON'T press Enter. Instead, press and hold the Ctrl and Shift keys, then press Enter.
Thanks, a lot. It works.
Hi,
If the data points are in an X-Y array: (example)
1 2 3 4
1 0 -1 0 -2
2 1 -2 0 0
3 2 1 1 -1
How can I use the LINEST function?
Thanks,
Amit
Amit,
Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
How do you plot this in 3D?
Administrative Note:
Welcome to the forum.
We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.
Please see Forum Rule #1 about hijacking and start a new thread for your query.
If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks