Find minimizer and the corresponding minima,

I want to find the minimizer and corresponding minima for the function f(x,y) = 3cos(x)sin((1/2)+((xy)/4)) subject to 0<=x<=5, 0<=y<=8
f = @(x,y) 3.*cos(x).*sin((1/2)+((x.*y)./4))
fminbnd(f,0,8)
thats my code but it doesn't work

2 Comments

Although you know what "it doesn't work" means, we do not. Does the code returned unexpected values, return the wrong data class, throw an error or make your laptop explode into flames?
It might surprise you to know that we cannot read minds, so if you want help then you actually need to give us information about:
  • How you are using the code
  • What you expect it to do
  • How it actually behaves
  • What you have tried
Please read this:
The clearer your description is, the faster and better we can help you.
fminbnd is used to find the minimum of a function of one variable but in your problem u have two variables x,y..

Sign in to comment.

Categories

Asked:

on 4 Jun 2015

Answered:

on 5 Jun 2015

Community Treasure Hunt

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

Start Hunting!