fitting straight line to part of data and extrapolate to x-axis at y = zero

20 Ansichten (letzte 30 Tage)
please I want syntax to fit straight line on part of data points which lay on a straight in this graph (I point red circle on this data) , and then extraplotate to X-axis at y=zero in order to calculate X Value at Y=ZERO

Akzeptierte Antwort

Image Analyst
Image Analyst am 18 Jul. 2021
If you don't know where the knee/kink/corner of your data is, then you can use a piecewise linear fit to fit the left and right portion to a line. The attached demo will figure out where that knee point is and give you the equation for each line.
  11 Kommentare

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Matt J
Matt J am 18 Jul. 2021
Bearbeitet: Matt J am 18 Jul. 2021
region=(y<0.01);
p=polyfit( x(region),y(region) ,1);
xroot= roots(p) % the extrapolated root

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by