How to write anonymous funtion to solve with lsqnonlin
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
f(x) = f1(x)^2+f2(x)^2+...+fn(x)^2 + lambda*norm(x)
0 commentaires
Réponse acceptée
Torsten
le 10 Déc 2015
function F = myfun(x)
F(1) = f1(x);
F(2) = f2(x);
...
F(n) = fn(x);
The constant L can be omitted since it does not influence the optimal x.
Best wishes
Torsten.
2 commentaires
Torsten
le 11 Déc 2015
Then use an (n+1)-th function f_(n+1)(x)=sqrt(L) if L is positive.
Best wishes
Torsten.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Linear Least Squares dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!