Find X intercept with error estimates

1 回表示 (過去 30 日間)
Arun
Arun 2025 年 4 月 8 日
編集済み: Matt J 2025 年 4 月 8 日
Hi,
So i have a set of energy values x and corresponding spectral information y.
I fit a straight line to my data with the polyfit function (which uses least square fitting)
I end up with coefficients p and the struct S containing the error estimates.
I want to find the x intercept with the associated uncertainity. How do I do this?
My attempt :
If I can find the errors on the coefficients p, then I can easily find the uncertainity in the x intercept through propagation of errors. But somehow I cant find the bounds of p in S?
PS : I know finding the intercept is just -p(2)/p(1), its the uncertainity I need help with.

採用された回答

Matt J
Matt J 2025 年 4 月 8 日
編集済み: Matt J 2025 年 4 月 8 日
If I can find the errors on the coefficients p, then I can easily find the uncertainity in the x intercept through propagation of errors. But somehow I cant find the bounds of p in S?
The approximate covariance matrix is,
Rinv=inv(S.R);
cov=(Rinv*Rinv')*S.normr^2/S.df

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMonte Carlo Analysis についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by