The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Optimization Quadratic Programming
Replies: 1   Last Post: Jan 3, 2014 7:32 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Weiss

Posts: 1,430
Registered: 11/27/08
Re: Optimization Quadratic Programming
Posted: Jan 3, 2014 7:32 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 1/2/2014 6:23 PM, Dahnial wrote:
> Hi,
> i have a function let say f= 2*x1*x2 + x1^2 - x1 - 2*x2 + ..............
> (note that the function can not be displayed by matlab because it is
> the result of inverse matrix, and it is very, very long so matlab can
> not display it)
> i want to optimize f so it tends to zero (minimize) with some constraint
> since it is quadratic i can use quadprog in matlab optimization toolbox
> [x,fval] = quadprog(H,f,A,b,Aeq,beq,lb,ub)
> but however, there comes my problem. if i use this function, i need to
> specify H matrix (hessian of the function) and f matrix. of course it
> will be a problem, since my function is very long enough that even
> matlab can not display it.
> Do you have suggestion for me to do the optimization?
> thanks
> best regards
> Dahnial S

I guess the question is how do you have the function f defined in MATLAB?
If you have it as a symbolic expression, you can use the 'hessian'
function to extract the H matrix.
If you have it some other way, let us know and maybe we can come up with
an idea.

Alan Weiss
MATLAB mathematical toolbox documentation

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.