Fitting two straight lines and find the intersection.

I have the graph similar to x=1:10;y=x.^2; plot(x,y) or plot(y,x). I want to fit part of the graph (some initial portion) in one straight line and other part of the graph (some final portion) in another straight line. Finally I want find the intersection of these fitted lines.

1 件のコメント

John D'Errico
John D'Errico 2016 年 4 月 21 日
編集済み: John D'Errico 2016 年 4 月 21 日
So, what have you tried?
1. Use polyfit for each region, getting the coefficients for a pair of lines.
2. Then apply high school math to find the intersection. Pencil and paper will suffice to write down the formula. Or use linear algebra to do the work.

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

回答 (0 件)

製品

タグ

質問済み:

2016 年 4 月 21 日

編集済み:

2016 年 4 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by