MATLAB: How to write anonymous funtion to solve with lsqnonlin

lsqnonlin regularizedOptimization Toolbox

f(x) = f1(x)^2+f2(x)^2+…+fn(x)^2 + lambda*norm(x)

Best Answer

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.
Related Question