finding intersection points by plot

조회 수: 17 (최근 30일)
Pouya Rezaee
Pouya Rezaee 2019년 5월 14일
답변: Star Strider 2019년 5월 14일
Hi. i've plotted a set of data against each other. now i want to find its intersection point with the x and y axis from the plot.
matlab only allows me to see the data points on the plot not the intersections.
any help?

답변 (1개)

Star Strider
Star Strider 2019년 5월 14일
If you are doing a linear regression, try this:
p = polyfit(x,y,1);
YAxisIntercept = p(2)
XAxisIntercept = -p(2)/p(1)
This gets significantly more complicated with a higher-degree polynomial or a nonlinear model.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by