Why this equation cannot be fitted?
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Zhaokuan Lu
il 15 Gen 2020
Risposto: Walter Roberson
il 15 Gen 2020
I'm trying to fit the function below:
fitfunction = strcat('l*x*z+l*y*z');
myfittype = fittype(fitfunction,...
'dependent',{'f'},'independent',{'x','y','z'},...
'coefficients',{'l'});
However, Matlab wouldn't allow me to creat the fittype. The error message here:
"Expression l*x*z+l*y*z is not a valid MATLAB expression, has non-scalar coefficients, or cannot be evaluated:
Not enough inputs to FITTYPE function."
Does anybody know why this happened? Thanks!
0 Commenti
Risposta accettata
Walter Roberson
il 15 Gen 2020
You cannot use 3 or more independent variables.
f = l*(x+y)*z
Implies
f/(z*(x+y)) = l
Which becomes the defining estimate with the understanding that / is the matlab matrix division operation
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Linear and Nonlinear Regression in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!