필터 지우기
필터 지우기

How to fit data to a curve with known error bars and draw it?

조회 수: 60 (최근 30일)
tensorisation
tensorisation 2019년 8월 12일
댓글: Adam Danz 2019년 8월 17일
Using built-in functions like fit(...) or nlinfit(...), how exactly do I fit data to a curve with known error bars?
Let's say in general I have
[x,y,err_x,err_y]
And now I want to make a fit for it, say: fit=fit(x,y,'exp1')
And later want to draw everything with the errorbars using errorbar(...)
How exactly do I do that?
EDIT: knowing how to do this for the more simple case of no errors in the X axis would also help. Say I have:
[x,y,err_y]
And now I want to make a fit for it, say: fit=fit(x,y,'exp1')
  댓글 수: 7
darova
darova 2019년 8월 17일
Try to pass red curve instead of original one
img12.png
tensorisation
tensorisation 2019년 8월 17일
I don't think that this produces what I'm looking for

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

답변 (1개)

the cyclist
the cyclist 2019년 8월 17일
편집: the cyclist 2019년 8월 17일
Do you mean that you want to do a fit where both your x and y variables have known measurement error? (Unlike, say, an ordinary least squares fit, where all error is assumed to be in y?)
To my knowledge, MATLAB does not have a built-in function for that. I have done Deming regression using this function from the File Exchange.
  댓글 수: 2
tensorisation
tensorisation 2019년 8월 17일
편집: tensorisation 2019년 8월 17일
Knowing how to do this for the case of only errors in y would also help me.
Let's say I have:
[x,y,err_y]
And now I want to make a fit for it, say: fit=fit(x,y,'exp1')

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

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by