From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: long summation function for fmincon
Date: Wed, 8 Dec 2010 01:06:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <idmllt$cbn$>
References: <idmk5k$5vv$> <idml8q$fqa$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1291770365 12663 (8 Dec 2010 01:06:05 GMT)
NNTP-Posting-Date: Wed, 8 Dec 2010 01:06:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:693452

> "stephen " <> wrote in message <idmk5k$5vv$>...
> > Also, at some point I will want to add coefficients to these terms from a 120x120 matrix.  How can I add that to the program?
> - - - - - - -
  In answer to your second question, if c is the coefficient matrix and x is a column vector, then

 f = x.'*c*x

will compute the first term using coefficients but I don't know what you want to do with the second term.

Roger Stafford