Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: quadratic form with symbolic vectors?
Date: Mon, 25 Feb 2008 19:36:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <fpv5b1$23h$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@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 1203968162 2161 172.30.248.35 (25 Feb 2008 19:36:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 Feb 2008 19:36:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:453556



I would like to differentiate x'Ax.  Here my x is y-B*u and
A is the identity matrix

syms B u1 u2 y1 y2 real
u=[u1; u2]
y=[y1; y2]
I=eye(2);
pretty(diff((y-B*u)'*I*(y-B*u),B))

I don't know how to interpret the output:

-2 (y1~ - B~ u1~) u1~ - 2 (y2~ - B~ u2~) u2~

what are all the tilda's for?  Am I doing this correctly?

Thanks!

David