polyfitの結果がNaNと表示される
Afficher commentaires plus anciens
polyfit関数を用いて2次の曲線近似を行おうとしたのですが,関数の出力がすべて「NaN」となってしまいます.原因や解決方法に心当たりがございましたら教えていただきたいです.
Réponses (1)
Atsushi Ueno
le 10 Jan 2022
0 votes
ドキュメンテーションによると、下記の原因があります。
% x または y のいずれかに NaN 値が含まれ、n < length(x) である場合、p のすべての要素が NaN です。
解決方法:入力xおよびyのNaN値を除く
Catégories
En savoir plus sur 多項式 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!