Overshoot
Overshoot
I would like some advice on this
N=10
1 2 3 4 5 6 7 8 9 10
0 8.75 8.75 8.75 8.75 8.75 8.75 8.75 8.75 8.75
1:10
Odd numbers perhaps, but it illustrates an overshoot after the first 8.75.
15 Feb 08, 12:08AM
With the number you have given then any interpolation scheme will do the same, these systems don't like sharp corners.
Even a very higher order polynomial, or Fourier approach (I've yet to write these but will), will have local overshot.
Therefore what you have to do is locally force conformity, it'll require a little bit of experimentation, but try this:
N=12
1 2 2.1 2.2 3 4 5 6 7 8 9 10
0 8.75 8.75 8.75 8.75 8.75 8.75 8.75 8.75 8.75 8.75 8.75
1:10
I've bolded the two extra terms (I hope you see these at 2.1 and 2.2).
5 Mar 08, 9:12PM
Does anyone know of any algorithm that will evaluate a "closeness of fit"?
For example, I have two stored cubic splines that I want to compare to a new spline and pick the one that is closer.
Any thoughts?
5 Mar 08, 11:15PM
Typical approach is to look at the Root Mean Squares (RMS), something like:
where
- f(x) is say your fitted function
- g(x) are your original points
double f[4]={1,2,3,4}; // approx values (say) double g[4]={1.1,2,2.9,4}; // real values double RMS=0; for(int i=0;i<4;i++) RMS+=pow(f[i]-g[i],2); RMS=sqrt(RMS/4.0);
Login