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

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?
Thank you for your comment
The problem is that x (the distance travelled) should in the end amount to a ceertain value (for example 10 meters), but the speed (xdot) should be such that the amount of energy consumed (W) is minimal.
So now I need to tell MatLab that xdot is in fact the derivative of x, can I do that with diff(x)? Or do I need other ways? (In the documentation there was a lot of stuff about gradients and Hessians, but diff(x) and der(x) were never mentioned....)
Do you know how to do this? Thank you!
Matt J
Matt J 2014년 11월 5일
편집: Matt J 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에 대해 자세히 알아보기

제품

태그

질문:

Don
2014년 11월 4일

편집:

2014년 11월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by