I have to find Max value of this function : fun = @(x) (b1 + b2*x(1) + b3*x(2) + b4*x(1)^2); The b's are vars in workspade. My problem is thant I don't know the optim toolbox. Can some one help me with my task. I need some function to find global Max of "fun". Thanks!