How to use "fsolve" for optimizing the objective function?

How can I optimize the below function using "fsolve". It only takes input argument in the form of vectors but I have to pass input arguments to the below function in the form of matrix.
I am getting the below error while using the optimization toolbox
Error running optimization. Inner matrix dimensions must agree.
function f = object(w)
k=10;
B=20;
f = sum ((w(1,:)/(w(2,:).^w(3,:)*k)+((w(3,:)-1)*w(4,:)/B*w(3,:))));
end

回答(0 个)

此问题已关闭。

关闭:

2021-8-20

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by