필터 지우기
필터 지우기

Plot curve that is 1 standard deviation away from best fit curve ?

조회 수: 2 (최근 30일)
RuiQi
RuiQi 2016년 12월 22일
답변: Star Strider 2016년 12월 22일
I have a plot that is quite noisy. I am able to fit it with a straight line using the poly fit line method with bisquare weights. https://www.mathworks.com/matlabcentral/answers/317817-how-to-use-least-squares-fit-with-bisquare-weights
I am now wondering if someone knows how I can fit a curve and maybe even plot the line that is roughly 1 standard deviation from the plotted curve. I am basically trying to get 2 lines that will encompass a large amount of the points. Maybe it could look something like that.. where the red represents the best fit curve and the green the plot that is 1 standard deviation away? The lines below are drawn in paint btw.
  댓글 수: 1
David Barry
David Barry 2016년 12월 22일
That's an interesting fit you have come up with. Not sure I would agree with it but it's difficult to tell with the Y axis scale you have plotted on.

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

답변 (1개)

Star Strider
Star Strider 2016년 12월 22일
Since you’re using polyfit, you can use the File Exchange polypredci (link) function. It defaults to 95% confidence intervals, so if you want one standard deviation, use 67% confidence intervals.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by