Click here to Skip to main content
15,867,308 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: need help in algorithum Pin
SoMad2-Aug-13 0:08
professionalSoMad2-Aug-13 0:08 
GeneralRe: need help in algorithum Pin
koll Zhu22-Sep-13 23:55
koll Zhu22-Sep-13 23:55 
QuestionCubic Spline Interpolation [Answered] Pin
Skippums18-Jul-13 15:02
Skippums18-Jul-13 15:02 
AnswerRe: Cubic Spline Interpolation Pin
Bernhard Hiller18-Jul-13 20:53
Bernhard Hiller18-Jul-13 20:53 
GeneralRe: Cubic Spline Interpolation Pin
Skippums19-Jul-13 7:38
Skippums19-Jul-13 7:38 
GeneralRe: Cubic Spline Interpolation Pin
Stefan_Lang22-Jul-13 1:21
Stefan_Lang22-Jul-13 1:21 
AnswerRe: Cubic Spline Interpolation Pin
Stefan_Lang22-Jul-13 2:07
Stefan_Lang22-Jul-13 2:07 
AnswerRe: Cubic Spline Interpolation Pin
Skippums23-Jul-13 11:57
Skippums23-Jul-13 11:57 
For anyone else looking at this, I figured out the answer. A cubic spline over N+1 points is solving for the 4 coeffients for each of the N cubic spline segments. This implies that you need exactly 4N equations to compute a unique spline over the data points (since you have 4N unknowns).

A cubic spline uses the following set of 4N-2 equations to compute the 4N cubic coefficients (the other two equations are boundary conditions, usually f''0(x0) = f''N(xN) = 0):

1) fn(xn) = yn (N equations)
2) fn(xn+1) = yn+1 (N equations)
3) f'n(xn+1) = f'n+1(xn+1) (N-1 equations)
4) f''n(xn+1) = f''n+1(xn+1) (N-1 equations)

As you can see by the above equations, the spline is not matched to meet a specified slope at each point, but instead only guarantees that two consecutive segments will have a continuous derivative (and second derivative). Because of this, I had to use cubic interpolation between each set of points using the equation given as Equation 1 on the Wikipedia Cubic Spline[^] page. This results in a piecewise interpolation that has a continuous first derivative, but does not have a continuous second derivative. In essence, this changes equalities 3 and 4 from above to be:

3) f'n(xn) = kn (N equations)
4) f'n(xn+1) = kn+1 (N equations)

Not a spline, but it consistently fits any consecutive subset of a dataset with the exact same cubic polynomial interpolations. I use the data points adjacent to those defining a segment's endpoints to estimate the slope at the segment endpoints.
Sounds like somebody's got a case of the Mondays

-Jeff

QuestionHow to determine whether change over time is an outlier Pin
GuyThiebaut7-Jul-13 0:02
professionalGuyThiebaut7-Jul-13 0:02 
AnswerRe: How to determine whether change over time is an outlier Pin
Manfred Rudolf Bihy23-Jul-13 11:22
professionalManfred Rudolf Bihy23-Jul-13 11:22 
GeneralRe: How to determine whether change over time is an outlier Pin
GuyThiebaut23-Jul-13 21:55
professionalGuyThiebaut23-Jul-13 21:55 
Questionfast division algoirthm Pin
khomeyni22-Jun-13 6:01
khomeyni22-Jun-13 6:01 
GeneralRe: fast division algoirthm Pin
harold aptroot22-Jun-13 10:32
harold aptroot22-Jun-13 10:32 
GeneralRe: fast division algoirthm Pin
khomeyni22-Jun-13 23:19
khomeyni22-Jun-13 23:19 
GeneralRe: fast division algoirthm Pin
harold aptroot23-Jun-13 1:42
harold aptroot23-Jun-13 1:42 
GeneralRe: fast division algoirthm Pin
khomeyni2-Jul-13 2:42
khomeyni2-Jul-13 2:42 
GeneralRe: fast division algoirthm Pin
harold aptroot2-Jul-13 3:11
harold aptroot2-Jul-13 3:11 
GeneralRe: fast division algoirthm Pin
khomeyni2-Jul-13 8:58
khomeyni2-Jul-13 8:58 
GeneralRe: fast division algoirthm Pin
harold aptroot2-Jul-13 9:44
harold aptroot2-Jul-13 9:44 
QuestionAlgorithm Sum From Offset To Number Pin
A*****17-Jun-13 12:37
A*****17-Jun-13 12:37 
AnswerRe: Algorithm Sum From Offset To Number Pin
A*****17-Jun-13 17:07
A*****17-Jun-13 17:07 
GeneralRe: Algorithm Sum From Offset To Number Pin
dusty_dex17-Jun-13 23:03
dusty_dex17-Jun-13 23:03 
GeneralRe: Algorithm Sum From Offset To Number[Edited] Pin
A*****18-Jun-13 12:50
A*****18-Jun-13 12:50 
GeneralRe: Algorithm Sum From Offset To Number[Edited] Pin
dusty_dex18-Jun-13 13:20
dusty_dex18-Jun-13 13:20 
GeneralRe: Algorithm Sum From Offset To Number[Edited] Pin
A*****18-Jun-13 13:24
A*****18-Jun-13 13:24 

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.