Click here to Skip to main content
15,889,116 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Real time peak identification [modified] Pin
Antonino Porcino1-Jun-11 5:56
Antonino Porcino1-Jun-11 5:56 
AnswerRe: Real time peak identification Pin
DMJ0011-Jun-11 10:12
DMJ0011-Jun-11 10:12 
GeneralRe: Real time peak identification Pin
largenqcd1-Jun-11 17:33
largenqcd1-Jun-11 17:33 
QuestionBest fit polynomial curve to non-continuous data points [Solved] Pin
Ian Shlasko23-May-11 4:43
Ian Shlasko23-May-11 4:43 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
_Erik_23-May-11 5:07
_Erik_23-May-11 5:07 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko23-May-11 5:20
Ian Shlasko23-May-11 5:20 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
_Erik_23-May-11 5:25
_Erik_23-May-11 5:25 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
Luc Pattyn23-May-11 5:20
sitebuilderLuc Pattyn23-May-11 5:20 
Hi Ian,

I don't think there are any closed formula's for what you are trying. What I would recommend is this, inspired by Newton-Raphson:

1. have some values a1,b1,c1,d1 and the corresponding value of your error function e1.
2. slightly change a1 (say by 1%) and recalculate e; find the "a-sensitivity" as (change in e)/(change in a)
3. same for b1, then c1, then d1
4. now choose new values a2,b2,c2,d2 based on the four sensitivities, maybe like so: a2=a1+coef*e/"a-sensitivity" where maybe coef is one.

then iterate until convergence is reached (i.e. sufficiently accurate); warning: this might diverge right away, if so try smaller values of coef (you could halve it in each consecutive try).

FWIW: with more-or-less random data, you'll never find a good fit with a single polynomial. What one normally does is a local approximation, which applies in a small region only. That is similar to a font being drawn as a sequence of Bezier curves; it pays of to have several simple Bezier curves, rather than trying to have a single very complex one (which in general will not be good enough).

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko23-May-11 6:02
Ian Shlasko23-May-11 6:02 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
Luc Pattyn23-May-11 6:12
sitebuilderLuc Pattyn23-May-11 6:12 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko23-May-11 7:28
Ian Shlasko23-May-11 7:28 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
Luc Pattyn23-May-11 7:50
sitebuilderLuc Pattyn23-May-11 7:50 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
Graham Toal23-May-11 9:54
Graham Toal23-May-11 9:54 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko23-May-11 9:58
Ian Shlasko23-May-11 9:58 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
Alan Balkany24-May-11 3:25
Alan Balkany24-May-11 3:25 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko24-May-11 3:41
Ian Shlasko24-May-11 3:41 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Alan Balkany24-May-11 3:43
Alan Balkany24-May-11 3:43 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko24-May-11 3:46
Ian Shlasko24-May-11 3:46 
QuestionShortes pass find + walls bypassing Pin
alikalik14-May-11 22:22
alikalik14-May-11 22:22 
AnswerRe: Shortes pass find + walls bypassing Pin
Luc Pattyn15-May-11 2:43
sitebuilderLuc Pattyn15-May-11 2:43 
AnswerRe: Shortes pass find + walls bypassing Pin
dasblinkenlight15-May-11 23:11
dasblinkenlight15-May-11 23:11 
NewsAckerman non-recursive function Pin
Raminnamiranian4-May-11 22:31
Raminnamiranian4-May-11 22:31 
GeneralRe: Ackerman non-recursive function Pin
Ravi Sant5-May-11 0:31
Ravi Sant5-May-11 0:31 
AnswerRe: Ackerman non-recursive function Pin
Luc Pattyn5-May-11 1:48
sitebuilderLuc Pattyn5-May-11 1:48 
GeneralRe: Ackerman non-recursive function Pin
Richard MacCutchan5-May-11 4:18
mveRichard MacCutchan5-May-11 4:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.