NonlinearModelFit not running

Posted 9 years ago
4569 Views
|
2 Replies
|
0 Total Likes
|
 Dear All,I'm fairly new to Mathematica. Please bear with me.I've already been able to fit some experimental data in Matlab. However, I want to implement it in Mathematica as well, so as to extract the statistics easier each time.The following is the model function I use. However, as I run the code it gives me a straight line which does not match my experimental data at all.My very first question is, whether the way I've defined the function is correct or not?I've attached the file which containes both the experimental data and the fitting function.I greatly appreacite your helps in advance.Kind Regards,Arman Attachments:
2 Replies
Sort By:
Posted 9 years ago
 As it stands, the starting parameters are bad and the model has no variance over the range, tryPlot[model[x, 37., 1.68, 50., 0.46, 0.73], {x, 1.63, 1.71}, Epilog -> {PointSize[Small], Point[Data4kI3]},  PlotRange -> Automatic]and see that the model grows seemingly linear betweenIn[60]:= model[#, 37., 1.68, 50., 0.46, 0.73] & /@ {1.63, 1.71}Out[60]= {3.21643, 3.21647}3.21643 and 3.21647, but the data vary in y from 0.56 to 0.63 over the range and have a strong peak around x = 0.65.Look at thisPlot[model[x, 37., 1.68, 50., 0.01, 0.55], {x, 1.63, 1.71}, Epilog -> {PointSize[Small], Point[Data4kI3]},  PlotRange -> {{1.63, 1.71}, {0.56, 0.64}}]to estimate how bad (without variability) the model is over the x-range the data have. Therefore NonlinearModelFit[] gives nothing but a horizontal line at about y=0.601 back.What to do next:Check the model (typos, missing expressions, ...) find a parameter area where it has the variability which is necessary to fit the dataif such an area of parameters is not available: change the modelreturn to NonlinearModelFit[] and get the job done
Posted 9 years ago
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments