Fit a spline function to a set of data points
Show older comments
Hi All,
I have a set of coordinate points
x= [0,4,6,10,15,20]
y = [18,17.5,13,12,8,10]
I want to fit a spline function.
Could someone please suggest the the curve fit function that can be used?
7 Comments
Do you want to use spline interpolation or spline fitting ?
For spline fitting, use
for spline interpolation, use "interp1" with the interpolation method "spline":
Deepa Maheshvare
on 3 Jul 2022
Sam Chak
on 3 Jul 2022
Okay, go to this 'interp1' documentation and use the 'spline' method.
Then see the example and post your code here. We will then try to fix it if there is an error.
Deepa Maheshvare
on 3 Jul 2022
Deepa Maheshvare
on 3 Jul 2022
Deepa Maheshvare
on 3 Jul 2022
Deepa Maheshvare
on 3 Jul 2022
Accepted Answer
More Answers (1)
Simon Chan
on 3 Jul 2022
0 votes
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
