Need help with interpolation

1 回表示 (過去 30 日間)
adi kul
adi kul 2016 年 7 月 18 日
回答済み: Star Strider 2016 年 7 月 18 日
Hello, I am having interpolation like:
xt1=interp2(yt,zt,xt,yt1,zt1,'spline');
Now I want it to change the interpolation to pchip so can anybody help me on how can I use pchip() which will be having same meaning as that of the interp2 used above?

回答 (2 件)

KSSV
KSSV 2016 年 7 月 18 日
xt1=interp2(yt,zt,xt,yt1,zt1,'pchip');

Star Strider
Star Strider 2016 年 7 月 18 日
The 'pchip' method is not available as an option in interp2. The closest you can come is the 'cubic' method, but it imposes conditions.
From the documentation for interp2 and the 'cubic' method:
  • Grid must have uniform spacing in each dimension, but the spacing does not have to be the same for all dimensions
If you have unevenly-spaced data, the 'spline' method is your only option.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by