Force begin/end slope of trendline scatterplot

4 ビュー (過去 30 日間)
Tijmen
Tijmen 2021 年 4 月 12 日
コメント済み: Tijmen 2021 年 4 月 13 日
Hi,
I have a scatterplot through which I want to plot a trendline. Using polyfit I get a line through my plot as seen in the picture below. This is a 2nd order polyfit. Higher order fits give less fitting lines. The line looks like it has a minimum, which is not desired. What I want to achieve is to fix the slope at x =1 to be 0 so that it has no minimum. How can I do this?

採用された回答

Jan
Jan 2021 年 4 月 12 日
編集済み: Jan 2021 年 4 月 12 日
  1 件のコメント
Tijmen
Tijmen 2021 年 4 月 13 日
Thanks Jan! The second link, the polyfix function, does exactly what I want.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by