polyfitの結果がNaNと表示される
7 views (last 30 days)
Show older comments
polyfit関数を用いて2次の曲線近似を行おうとしたのですが,関数の出力がすべて「NaN」となってしまいます.原因や解決方法に心当たりがございましたら教えていただきたいです.
0 Comments
Answers (1)
Atsushi Ueno
on 10 Jan 2022
ドキュメンテーションによると、下記の原因があります。
% x または y のいずれかに NaN 値が含まれ、n < length(x) である場合、p のすべての要素が NaN です。
解決方法:入力xおよびyのNaN値を除く
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!