- 'spline' および 'makima' メソッドの場合
多次元の外挿について
26 views (last 30 days)
Show older comments
3次元や4次元の外挿は無いのでしょうか?
以前、別の質問で1次元しか外挿ができないと回答があったのですが、
多次元外挿はMATLABには機能が無いのでしょうか?
simulinkのLookuptableと同じ機能をMATLABコードにしたいのですが、外挿で悩んでます。
1 Comment
Accepted Answer
Yoshio
on 11 Oct 2019
Edited: Yoshio
on 11 Oct 2019
griddedInterpolant では、1 次元、2 次元、3 次元、N 次元のグリッドデータセットに対する内挿および外挿
- 外挿法は、'linear'、'nearest'、'next'、'previous'、'pchip'、'cubic'、'spline' または 'makima'
scatteredInterpolant では、散布データの 2 次元または 3 次元データセットの内挿および外挿
- 外挿法は、'nearest'、'linear'
ができます。
5 Comments
Yoshio
on 14 Oct 2019
Edited: Yoshio
on 14 Oct 2019
もしどうしても、'linear' ということでしたら、以下のようにすればよいと思います。なお、'spline'、'makima'でも同じ値になります。
%% 'linear'
F = griddedInterpolant({A,B,C,D},data_set,'linear');
F(1,2,3,1)
F(1,2,3,2)
F(1,2,3,1.5)
F(1,2,3,3)
%% 'spline'
F = griddedInterpolant({A,B,C,D},data_set,'spline');
F(1,2,3,1)
F(1,2,3,2)
F(1,2,3,1.5)
F(1,2,3,3)
%% 'makima'
F = griddedInterpolant({A,B,C,D},data_set,'makima');
F(1,2,3,1)
F(1,2,3,2)
F(1,2,3,1.5)
F(1,2,3,3)
なお、今後のお願いになりますが、以下ご理解の上ご質問ください。
MATLAB Answers:
オープンなユーザーコミュニティーで、ユーザー同士の助け合いの場です。
世界中の数多くのMATLABユーザーである研究者やエンジニアから“MATLABの使い方”を超えた専門的な参考意見をもらえる可能性もあります。MathWorks社員(STAFFマーク付きのアカウント)も1ユーザーとして回答していますが、 STAFFへの個別メッセージによるご質問には原則お答えできませんので、ご了承ください。
なかなか回答が付かないという場合にはこちらも参考にしてみてください。
More Answers (0)
See Also
Categories
Find more on ソルバー出力と反復表示 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!