Path: news.mathworks.com!not-for-mail
From: "Ashish Uthama" <authama@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: quadratic form with symbolic vectors?
Date: Mon, 25 Feb 2008 15:05:28 -0500
Organization: TMW
Lines: 27
Message-ID: <op.t63jfe0okk0qo1@uthamaa.dhcp.mathworks.com>
References: <fpv5b1$23h$1@fred.mathworks.com>
NNTP-Posting-Host: uthamaa.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
Content-Transfer-Encoding: Quoted-Printable
X-Trace: fred.mathworks.com 1203969928 22103 144.212.206.107 (25 Feb 2008 20:05:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 Feb 2008 20:05:28 +0000 (UTC)
User-Agent: Opera Mail/9.25 (Win32)
Xref: news.mathworks.com comp.soft-sys.matlab:453561




looks like 'pretty' is messing things up (or rather, I do not know how t=
o  =

interepret this..)

>> (diff((y-B*u)'*I*(y-B*u),B))

ans =3D

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

(if you did not know, PRETTY just not change the answer, just tries to  =

print the ans in a 'nice' way)


On Mon, 25 Feb 2008 14:36:02 -0500, David Doria <daviddoria@gmail.com>  =

wrote:

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