1

I tried fitting my data in gnuplot as before. I only changed the formula but the error "Singular matrix in Invert_RtR" always occurs. I tried varying the starting values of all parameters but it didn't help. Here is my formula and parameters (I only plot the first equation (f(x)):

f(x)=anfang_1*exp(-lag_1*Wachstumsrate_1) \
         *(-1+exp(lag_1*Wachstumsrate_1)+exp(Wachstumsrate_1*x))

anfang_1=-2
lag_1=0.1
Wachstumsrate_1=0.005

fit f(x) 'bsln.dat' using 1:2 \
    via anfang_1,lag_1,Wachstumsrate_1,Delta_1 

plot 'bsln.dat' using 1:2 ls 1 ti ''  ,\
     f(x) ls 1 ti 'B. subtilis mit DMSO'

Here is my data :

0   -1.552841969
40  -1.337242168
80  -1.537602002
120 -1.522878745
160 -1.48148606
200 -1.468521083
240 -1.356547324
280 -1.346787486
320 -1.22184875
360 -1.070581074
400 -0.89279003
440 -0.795880017
480 -0.707743929
520 -0.649751982
560 -0.588380294
600 -0.549750892
640 -0.514278574
680 -0.48945499
720 -0.469800302
760 -0.448550002
800 -0.437707136
840 -0.425968732
880 -0.42136079
920 -0.416801226
960 -0.415668776
1000    -0.419075024
1040    -0.428291168
1080    -0.435333936
1120    -0.452225295
1160    -0.463441557
1200    -0.485452247
1240    -0.512861625
1280    -0.543633967
1320    -0.586700236
1360    -0.628932138
1400    -0.681936665
1440    -0.744727495
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • You fit `f(x)` via `..., Delta_1`... where is `Delta_1`? –  Jan 10 '17 at 18:11
  • Well, without `Delta_1` it fits data, but not so good –  Jan 10 '17 at 18:17
  • Based on your plot title "B. subtilis" and on the names of the variables, I assume that you are dealing with bacterial growth. Just for curiosity: What are the negative y-values? Is this already the logarithm of something? – maij Jan 10 '17 at 23:04

1 Answers1

0

Your fit command includes via Delta_1, but the fit function f(x) does not depend on Delta_1. Therefore the Jacobian matrix, which includes the derivatives of f(x) with respect to all fit parameters and which appears in the Marquardt-Levenberg fitting algorithm of gnuplot, is a singular matrix. And this finally leads to the error message.

maij
  • 4,094
  • 2
  • 12
  • 28