Where does my (small) notebook go wrong?

  • Thread starter Thread starter Shukie
  • Start date Start date
AI Thread Summary
An experiment was conducted using a spectroscope to determine Rydberg's constant, but issues arose with the NonLinearModelFit function in the analysis. The user sought assistance in troubleshooting the model fit, specifically regarding the choice of starting points for the parameter "p." Suggestions were made that starting values like {p, 0} or {p, 0.027} could improve the fitting process. Ultimately, a revised model fit was successfully achieved with the recommended starting points, resolving the initial problem.
Shukie
Messages
91
Reaction score
0
Hi all,

A few days ago I have done an experiment with a spectroscope to find the value of Rydberg's constant. In my notebook I have a dataset that I want to use a NonLinearModelFit on to find this constant. However, it will not work and I just can't figure out why it won't. I have gotten rid of everything else in the notebook to keep it as clear as possible:

View attachment Notebook1.nb

Could anyone please take a look?
 
Physics news on Phys.org
I think the problem is all in your starting points. Do you have a better starting point for "p" than one?
I see that {p,0} or {p,0.027} works:
Code:
fit3 = NonlinearModelFit[
  dat1, \[Theta]nul + \[Alpha] + (ArcSin[p k - Sin[\[Alpha]]]), {{p, 
    0}, {\[Theta]nul, 3.15}, {\[Alpha], 0.}}, k, Weights -> wt]
 
Thanks a bunch, that works indeed!
 

Similar threads

Back
Top