Singular matrix (or other numeric) error by fitting an implicit function with ODR-Package
| gr4nd | October 7, 2008 - 05:47 | ||
|---|---|---|---|
|
Hello everybody, I'm new to Igor and this Forum, but by now i've read a lot of the Igor's user help files, since i got a big problem with the ODR-Fitting Package. So here is what i did. This is my function, where j and U are the variables (measured data). You will see, that u cant get it into U=f(j) or j=f(U): j=Isc-j0*(exp((U+j*Rs)/(n*k*T))-1)-(U+j*Rs)/Rp Thats why i subtracted j to get it into the /ODR=3 required form. The "coefficients" i want to know are the following (starting values in brackets).: The starting value's should be fine, because if i plot the function with these values (and of cause the constants i found by trying a long time ^^), it nearly completely matches the measured data (by eye). This is what my procedure window is like. #pragma rtGlobals=1 // Use modern global access method. constant Rs=2.8 constant n=1.5 constant T=314 Function I_U_Kennlinie(w,U,j) : FitFunc Wave w Variable U Variable j //CurveFitDialog/ //CurveFitDialog/ Coefficients 3 //CurveFitDialog/ w[0] = j0 //CurveFitDialog/ w[1] = Rp //CurveFitDialog/ w[2] = Isc return w[2]-w[0]*(exp((U+j*Rs)/(n*8.617343E-5*T))-1)-(U+j*Rs)/w[1]-j end And now the command to get the fit starting: FuncFit/ODR=3 I_U_Kennlinie, w /X={U_Werte, I_Werte}/XD={U_WerteFit,I_WerteFit} My only explanation for the error is, that j0 is simply to small and has only little of influence on the function (Great changes are needed to modify the function's graph with a change to j0) for getting a change in the derivatives. The constraints range of j0 is about 1e-12 to 1e-6. Thanks a lot |
|||

Joined: 2007-06-29
Location: United States
Martin-
Making implicit fits work can be tricky, and it's hard to give advice since this is such a new feature of Igor. Please send me a copy of your experiment file with the data and fitting function so that I can look at it. Send it to support@wavemetrics.com.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com