How can I write a program for cubic spline?

Hello!
How can I write programs for
  • natural cubic splines
  • periodic cubic splines
  • Hermite cubic splines?
I do not have any data, so am I allowed to just take some data?
I should take xi, i = 0,..., n+1 with
yi, i = 0,..., n+1
and determine the moments Mi

 Accepted Answer

Read about interp1()

2 Comments

Thank you! As you could think I am very new to matlab but slowly it's getting better!

Sign in to comment.

More Answers (0)

Asked:

on 20 Nov 2018

Commented:

on 22 Nov 2018

Community Treasure Hunt

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

Start Hunting!