0
|
4730 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# NonlinearModelFit not running

Posted 10 years ago
 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 10 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:= model[#, 37., 1.68, 50., 0.46, 0.73] & /@ {1.63, 1.71}Out= {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 10 years ago