How to specify an objective function with both a variable and its derivative?
显示 更早的评论
Dear all,
In order to minimize the energy used in the motion of a mass with aerodynamic drag, I need to specify an objective function. This objective function should contain both the displacement (x) and the velocity (xdot).
So basicly, the objective function should look like: W=(1/2)*C1*x*xdot^2-R*x
Does anyone know how to enter this into an objective function that the optimization toolbox can handle?
Thank you in advance!
3 个评论
Matt J
2014-11-4
What are the unknowns in W=(1/2)*C1*x*xdot^2-R*x and what are the dimensions of all the quantities involved?
Also, if you know the expression for the objective function already, what needs clarifying about the implementation? Why not code it just as you've written it?
Don
2014-11-5
So now I need to tell MatLab that xdot is in fact the derivative of x, can I do that with diff(x)?
Possibly, but it would still be good to have an answer to my question above. What are the unknowns in W=(1/2)*C1*x*xdot^2-R*x and what are the dimensions of all the quantities C1,x,xdot, and R?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surrogate Optimization 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!