1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What should I choose as the error on x? (Curve Fitting Matlab)

  1. Oct 16, 2015 #1
    1. The problem statement, all variables and given/known data
    So I've done an experiment by scanning over a range of angle and measuring the intensity of X-Rays. There are peaks where I have X-Ray diffraction occurring and in order to do analysis I need to identify the values of angle and an error (as in the plus/minus) on this value.

    3. The attempt at a solution
    The Peaks are very much like a gaussian so I used the curve fitting tool on matlab to fit a gaussian to the data and use the value of b (position of the center of the peak) as my value for angle.

    An example fit can be seen here: http://imgur.com/0rm2TeB

    Now my problem is what to choose for an error?

    The fit returns something called 95% confidence bounds so I tried taking the difference between them and the actual value as the error but it seems a little small for some of the fits which are somewhat poorly shaped.

    My only other thoughts would be the Standard Deviation or the FWHM but I'm really not sure what I should use, nor how to justify what I choose.

    Any Ideas?
  2. jcsd
  3. Oct 16, 2015 #2


    User Avatar
    Gold Member

    just a note... looking at your example, you need more resolution for your data. Would it be possible for you to take your test again?

    It might get rid of the some of the "poorly shaped fits." its very possible that the fits are poorly shaped due to the fact that you don't have proper data.
  4. Oct 16, 2015 #3


    User Avatar
    Gold Member

    I'm also confused about what exactly you are trying to measure, can you clarify?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: What should I choose as the error on x? (Curve Fitting Matlab)
  1. MATLAB errors (Replies: 4)