Cubic Spline Interpolation Method for Calculating Y-Values in C

  • Thread starter Thread starter theerapol
  • Start date Start date
Click For Summary

Homework Help Overview

The discussion revolves around the cubic spline interpolation method for calculating y-values based on a given dataset of x and y points. The original poster presents a specific problem involving the calculation of y-values at x=2.5, 5.7, and 9.75 using this method in C programming.

Discussion Character

  • Exploratory, Conceptual clarification, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the definition and understanding of cubic spline interpolation, with some questioning how to implement it in C for a dataset of 10 points. There is mention of a pseudo-code algorithm from a numerical analysis textbook as a potential resource.

Discussion Status

The discussion is ongoing, with participants exploring the concept of cubic spline interpolation and its implementation. Some guidance has been offered regarding resources for understanding the method, but there is no explicit consensus on a solution or approach yet.

Contextual Notes

There is an emphasis on the need for an attempted solution from the original poster, as well as a suggestion to consult external resources for better understanding. The discussion reflects a learning process rather than a straightforward resolution.

theerapol
Messages
2
Reaction score
0
There is a 10 points data set:

x: 1 2 3 4 5 6 7 8 9 10
y: 1 8 27 64 125 216 343 512 729 1000

calculate the y-value at x=2.5, 5.7 and 9.75 by using cubic spline interpolation method

(in C language)
 
Physics news on Phys.org
Okay, as a start what is the "cubic spline interpolation method"?

For that matter, what is a "cubic spline"?
 
Cubic spline interpolation is one of numerical method to find trend of data (like regressive equation). For cubic spline interpolation, I don't know how to solve this problem in c language when we have 10 data points.
 
Numerical Analysis by Richard L. Burden and J. Douglas Faires gives a pseudo-code algorithm on how to program such a problem. If you don't know how to do it for 10 data points than you don't know how to do it for any amount of data points. Since you haven't posted an attempted solution I suggest searching the web on what exactly cubic spline interpolation is. Or reading that section of the textbook I suggested in a library or a bookstore.

[Edit] The book edition I have is edition 8.
 
Last edited:

Similar threads

Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
11
Views
2K
Replies
2
Views
1K