Finding the x intercept

조회 수: 3 (최근 30일)
Darpan Verma
Darpan Verma 2019년 3월 10일
댓글: Darpan Verma 2019년 3월 10일
I have this curve fit plot. as shown in the figure below. How can I find at y = 0? as marked in the figure. This is a point where y = 0. I need a generalized code which can keep on finding value at y = 0 and keeps storing in a table.Screen Shot 2019-03-10 at 3.47.32 PM.png
  댓글 수: 1
Darpan Verma
Darpan Verma 2019년 3월 10일
This is what I am doing now to find its value.
Screen Shot 2019-03-10 at 3.53.08 PM.png

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2019년 3월 10일
fitresult(1) is evaluating the model at x = 1, not extracting the first coefficient.
coeffs = coeffvalues(fitresult);
m = coeffs(1);
b = coeffs(2);
Yintercept = b;
Xintercept = -b/m;
  댓글 수: 1
Darpan Verma
Darpan Verma 2019년 3월 10일
Thanks a lot Walter. That worked :) I really appreciate it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by