Cubic Splines for Interpolation

3 Ansichten (letzte 30 Tage)
Anon
Anon am 13 Okt. 2018
Beantwortet: Bruno Luong am 13 Okt. 2018
Given an array of data T.
I have one missing element which I would like to use interpolation to find.
How do I use cubic splines to interpolate this element?

Antworten (3)

madhan ravi
madhan ravi am 13 Okt. 2018
Bearbeitet: madhan ravi am 13 Okt. 2018
since you didn't provide any details see csapi and csape

Anon
Anon am 13 Okt. 2018
I dont have curve fitting toolbox so csacpi won't work.
if x = [Oct_17(1:30,2)]; y = [1:30];
What code do I used to plot and produce cubic spline ?

Bruno Luong
Bruno Luong am 13 Okt. 2018
% fake data
x = sort(rand(1,5))
y = rand(size(x))
xmissing = linspace(0,1,1000); % put here coordinates of pts to be computed
ycomplete = interp1(x,y,xmissing,'spline');
plot(x,y,'or',xmissing,ycomplete,'-')

Kategorien

Mehr zu Splines finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by