|
Hallo, ?Fit "Fit[data, funs, vars] finds a least-squares fit to a list of data as a \ linear combination of the functions funs of variables vars. The data can have \ the form {{x1, y1, ... , f1}, {x2, y2, ... , f2}, ... }, where the number of \ coordinates x, y, ... is equal to the number of variables in the list vars. \ The data can also be of the form {f1, f2, ... }, with a single coordinate \ assumed to take values 1, 2, ... . The argument funs can be any list of \ functions that depend only on the objects vars." also sind x1,x2,x3,x4 die Variablen und es soll f[x1,x2,x3,x4] berechnet werden. In den Daten muss also {x1[i],x2[i],x3[i],x4[i],f[x1[i],x2[i],x3[i],x4[i]]} die Funktionen sind also auch x1,x2,x3,x4 und man bekommt: Fit[data, {x1, x2, x3, x4}, {x1, x2, x3, x4}] 24.8902 x1 - 0.00471348 x2 + 0.0668466 x3 + 3.17493 x4 Gruss Jens "Dr. Heinrich Tersch" wrote: > > Hallo Mathematica-Freunde, > kann jemand mal auf mein einfaches Problem schauen? Ich finde den Fehler > nicht, bin anscheinend betriebsblind. Danke im voraus! H. Tersch > Notebook: > data ={{0,10,0,0,0.0517}, > {0,30,0,0,0.156}, > {0.03,10,0.5,0.3,0.67}, > {0.03,30,0.5,0.3,0.705}, > {0.06,20,0.5,0.3,1.34}, > {0.06,20,1,0.3, 1.587}, > {0.06,20,0.6,0.6,2.377}, > {0.06,20,1,0.6,2.646}, > {0.06,20,2,0.6,3.148}, > {0.06,20,2,1.2,5.221}, > {0.06,30,1,0.3,1.621}, > {0.1,20,0.5,0.3,2.207}, > {0.1,20,1,0.3,2.639}, > {0.1,20,1,0.6,4.332}, > {0.1,20,2,0.6,5.208}, > {0.1,20,2,1.2,8.547}, > {0.6, 100,1,0.3,15.86}, > {0.06,100,1,0.3,1.801}, > {0.06,200,1,0.3,2.046}}; > Fit[data,{x1,x2,x3,x4},{x1,x2,x3,x4,y}] > Fit::"fitc": > "Number of coordinates (\!\(4\)) is not equal to the number of > variables \ > (\!\(5\))." > |