Why this equation cannot be fitted?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zhaokuan Lu
le 15 Jan 2020
Réponse apportée : Walter Roberson
le 15 Jan 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 commentaires
Réponse acceptée
Walter Roberson
le 15 Jan 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!