フィルターのクリア

Regression line that includes x and y errors.

10 ビュー (過去 30 日間)
Research
Research 2023 年 2 月 20 日
編集済み: Matt J 2023 年 2 月 20 日
Hi,
I have x and y data set, and each x and y variables have 5% and 10% uncertainty or error, respectively. How I should find a one regresion or best fit line (Best_y = mx + c) for such a dataset? Here is the dataset. Any thoughts? Thanks.

採用された回答

Matt J
Matt J 2023 年 2 月 20 日
編集済み: Matt J 2023 年 2 月 20 日
  4 件のコメント
Research
Research 2023 年 2 月 20 日
Thanks. It runs now. This is a great function. So, just I understand the linear2dFit function, particularly how the function incorporates the error values. In my case, I need to build an array (xy here) that includes +/-x and +/-y error values.This xy array has x and y values also error dx and dy values too. I believe the function then find a best fit through all these points. Thanks!
Matt J
Matt J 2023 年 2 月 20 日
編集済み: Matt J 2023 年 2 月 20 日
Thanks. It runs now. This is a great function
Glad it's working for you, but if it's doing what you need, I'd be much obliged if you'd Accept-click the answer.
particularly how the function incorporates the error values?
The fit is a total least squares fit, so it assumes there are errors in both x and y.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by