How to make spline basis matrix?

4 ビュー (過去 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.
  2 件のコメント
Matt J
Matt J 2020 年 12 月 21 日
Servane Lunven
Servane Lunven 2020 年 12 月 29 日
Thanks but what is the kernel?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSplines についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by