fminsearch also works with functions, not only function handles.
fun = @(f)FUN(f(1),f(2),f(3),f(4));
f10 = ...;
f20 = ...;
f30 = ...;
f40 = ...;
f0 = [f10,f20,f30,f40];
f = fminsearch(fun,f0);
f1 = f(1)
f2 = f(2)
f3 = f(3)
f4 = f(4)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!