Need to make a line on existing graph

1 回表示 (過去 30 日間)
birdnerd007
birdnerd007 2020 年 5 月 9 日
編集済み: Cris LaPierre 2020 年 5 月 9 日
Hello, my code that I used to create this graph is above. I need to create a line that has a slope of 606 and is off-set by 0.002 in the +x-direction. Essentially, the point where this line intersects with my graph using the above information is what I'm looking for. The line can stop at 25 in the y-direction. I'm not sure if I am asking this correctly or not. I'm happy to try and clarify to the best of my abilities. I appreciate your help.

採用された回答

Cris LaPierre
Cris LaPierre 2020 年 5 月 9 日
編集済み: Cris LaPierre 2020 年 5 月 9 日
Creating the line is simple. You should be familiar with the equation y=m*x + b by now. More challenging is going to be finding the intercept since the chance your two lines share a point in common is almost none. You'll need to implement some sort of algorithm to find the closest point. The simplest might be to subtract the y values of the two lines and identify the minimum.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDirected Graphs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by