Cubic Spline Fit-Just confirm the code

9 visualizzazioni (ultimi 30 giorni)
I have two vectors, X, and Y (of same size).
Now, I am interested in cubic spline fit of the data points (Y) at certain values (let's call this vector as "x") by the code:
x = 1:1:125;
y = interp1(X,Y, x,'spline')
The "plot (x,y,'--r')" command will give the cubic spline fit for data points (represented in Y), right?

Risposta accettata

John Petersen
John Petersen il 11 Lug 2012
right. You can verify this by

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by