Path: news.mathworks.com!not-for-mail
From: "lovish " <lovishagarwal@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: problem regarding maximizing a function
Date: Sun, 12 Apr 2009 19:00:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <grtdnj$fr7$1@fred.mathworks.com>
Reply-To: "lovish " <lovishagarwal@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1239562803 16231 172.30.248.35 (12 Apr 2009 19:00:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 12 Apr 2009 19:00:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1189748
Xref: news.mathworks.com comp.soft-sys.matlab:532176

Hi, 

I have a problem with regard to maximizing a function. I'm using optimization tool and using fmincon command in that. 

Suppose I have to optimize f(x)=  log [x(1)+ x(6)]  + log x(2) + log x(3) + log x(4) + log x(5) 
subject to              x1<=1, x2+x3+x5<=1. x1+x5<=1 , x4<=1; x6<=1

all values are greater than 0. 

I'm able to formulate the problem using optimtool. My problem is that while calculating the value of function f(x) , it is taking mod of f(x) and the values shown are positive. The graph that I need to plot should be concave and it is not coming out to be so .

The values I'm getting are
      7.1309       
      5.30837        
      4.43032      
      3.30974     
      2.78305        
      2.77553           
      2.77319           
      2.77259            
      2.77259     

for each iteration . The values in reality should be negative. Please guide me as to where I;'m going wrong.