Optimization Problem With 5 Variables.
显示 更早的评论
Hello I need help with a problem I have to do.
I have to minimize and find the minimal value of
F = (x - 3)^2 + (y - 1)^4 + (u - z)^2 + (u - (2 * w))^2 + (u-6)^2 + 12;
Right now the code i have is
function [Fx] = five_var(f,v)
x = v(1);
y = v(2);
u = v(3);
w = v(4);
z = v(5);
Fx = fminsearch(f, v);
Where I input parameters for v and the function F above for f. However, it is not working and I am not sure why because I am, as far as I can tell, utilizing the same process that the mathworks site recommends. Please help!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Direct Search 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!