poly fit warning when drawing vertical curves
古いコメントを表示
Im trying to draw quadratic curves using polyfit function on points that is almost vertical to illustrate a particular shape. eg across points (0,0) (1,5) (0,5) Obviously it would generate warning for having 2 identical x coordinates, is there any alternative I can use to avoid the warning without changing the coordinates of the points? Or is there other functions available to do that?
Thanks
回答 (1 件)
Walter Roberson
2016 年 1 月 10 日
0 投票
No. If you have duplicate x coordinates then that is not a polynomial curve. It might be a rotation of a polynomial but not a polynomial.
3 件のコメント
Jonathan To
2016 年 1 月 10 日
Walter Roberson
2016 年 1 月 10 日
Exchange your x and y coordinates, fit that, polyval(), exchange back
Jonathan To
2016 年 1 月 10 日
カテゴリ
ヘルプ センター および File Exchange で Polynomials についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!