polyfitの結果がNaNと表示される
Show older comments
polyfit関数を用いて2次の曲線近似を行おうとしたのですが,関数の出力がすべて「NaN」となってしまいます.原因や解決方法に心当たりがございましたら教えていただきたいです.
Answers (1)
Atsushi Ueno
on 10 Jan 2022
0 votes
ドキュメンテーションによると、下記の原因があります。
% x または y のいずれかに NaN 値が含まれ、n < length(x) である場合、p のすべての要素が NaN です。
解決方法:入力xおよびyのNaN値を除く
Categories
Find more on Interpolation of 2-D Selections in 3-D Grids 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!