# A Matlab Question

• Aug 7th 2009, 06:32 PM
analysismath
A Matlab Question
Dear all,

I want to maximize a function, in which one of the argument of the function is a variable which is a function of the argument of the original objective function. How can I call that argument into the objective function?

In particular, suppose I want to maximize f(x, y) over x, where y=g(x) is solved from an implicit function H(x, y)=0. So how can I write the code to max f(x, g(x)) over x, when g(x) cannot be expressed explicitly and only can be solved implicitly from H(x, g(x))=0?

• Aug 8th 2009, 12:30 AM
CaptainBlack
Quote:

Originally Posted by analysismath
Dear all,

I want to maximize a function, in which one of the argument of the function is a variable which is a function of the argument of the original objective function. How can I call that argument into the objective function?

In particular, suppose I want to maximize f(x, y) over x, where y=g(x) is solved from an implicit function H(x, y)=0. So how can I write the code to max f(x, g(x)) over x, when g(x) cannot be expressed explicitly and only can be solved implicitly from H(x, g(x))=0?

Numerically or symbolically?

If numerically:

Write a function gg(x) to solve H(x,g)=0 where x is a parameter and g the variable.

Then write a function ff(x) which is equal to f(x,gg(x)), and use the minimisation tools to minimise ff(x).

CB
• Aug 8th 2009, 01:02 AM
analysismath