フィルターのクリア

How can I know the new value of y after spline interpolation?

3 ビュー (過去 30 日間)
Ezz El-din Abdullah
Ezz El-din Abdullah 2017 年 2 月 1 日
編集済み: Stephen23 2017 年 2 月 2 日
I used csaps() and assigned it into cs which is a structure that holds breaks (x-interpolated values), coefficients, order, dim, etc. But not the new value of y.
So how can I get this vector?
  2 件のコメント
KSSV
KSSV 2017 年 2 月 2 日
Post your full code..
Image Analyst
Image Analyst 2017 年 2 月 2 日
I don't know what csaps() is. What toolbox is that in? List it in the Products section below. In the meantime, attached is my spline interpolation demo.

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

採用された回答

Stephen23
Stephen23 2017 年 2 月 2 日
編集済み: Stephen23 2017 年 2 月 2 日
According to the csaps documentation (part of the Curve Fitting toolbox), you can either use fnval:
pp = csaps(...)
yy = fnval(pp,xx)
or call csaps itself with the new X values to get the new Y values:
yy = csaps(x,y,p,xx)
For example:
>> pp = csaps(0:pi,sin(0:pi));
>> yy = fnval(pp,0:0.5:pi)
yy =
0.082568 0.46933 0.7632 0.88597 0.81813 0.57192 0.22799
It is easy to navigate the MATLAB help: all spline functions are listed here, with lots of help showing how to use them:
Instead of getting confused, learn to read MATLAB's help, and learn how to browse the contents on the LHS of the page: it is arranged very nicely by topic.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by