Fittype TestAnonymousFunction Argument Error
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Can someone please explain why I keep getting this error?
Error using fittype>iTestAnonymousFunctionArgumentOrder (line 811) The coefficients must come before the problem parameters.
I have my function as:
fun=@(F,PS,fp,fis,x)...
longobjfun(x,F,PS,fp,fis,A);
ft = fittype(...
fun, ...
'problem',{'A'},...
'coeff', {'F','PS','fp','fis'});
I know that for fittype, the anonymous function has to have a form of:
fun = @(fitparameters, problemparameters, independent) expression;
It stated that problemparameters can be optional. How do I remove this? I'm not sure what to do with this.
0 commentaires
Réponses (1)
Chandani Madnani
le 6 Oct 2017
Modify the code as shown below to pass the Problem parameter and see if it works:
fun=@(F,PS,fp,fis,A,x)... longobjfun(x,F,PS,fp,fis,A); ft = fittype(... fun, ... 'problem',{'A'},... 'coeff', {'F','PS','fp','fis'});
4 commentaires
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!