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 Commenti

Stephen23
Stephen23 il 4 Giu 2015
Modificato: Stephen23 il 4 Giu 2015
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..

Accedi per commentare.

Richiesto:

il 4 Giu 2015

Risposto:

il 5 Giu 2015

Community Treasure Hunt

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

Start Hunting!

Translated by