How to make spline basis matrix?

조회 수: 15 (최근 30일)
Sarah
Sarah 2012년 3월 2일
댓글: Servane Lunven 2020년 12월 29일
I'm trying to find out how to make a basis matrix of natural cubic splines. That is, I have 256 knots, the integers 1:256, and I want a 256x12 matrix of 12 basis splines defined on the frequencies. What I'm looking for is the Matlab equivalent of the "ns" function in R. (<http://stat.ethz.ch/R-manual/R-devel/library/splines/html/ns.html>) Is this possible?
  댓글 수: 1
Servane Lunven
Servane Lunven 2020년 12월 21일
If you have found the answer, i would be interested !

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2020년 12월 21일
편집: Matt J 2020년 12월 21일
Example1D.m in this File Exchange submission shows how to set up a B-spline basis matrix,
You can adapt the same example to any other basis function that you wish, although B-splines are particularly stable as compared to other spline types, so I don't know why you wouldn't use them instead.

카테고리

Help CenterFile Exchange에서 Splines에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by