Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: quadratic form with symbolic vectors?
Date: Mon, 25 Feb 2008 20:28:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 31
Message-ID: <fpv8ch$6sj$1@fred.mathworks.com>
References: <fpv5b1$23h$1@fred.mathworks.com> <op.t63jfe0okk0qo1@uthamaa.dhcp.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1203971281 7059 172.30.248.37 (25 Feb 2008 20:28:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 Feb 2008 20:28:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:453566



I did know that pretty tried to make it display nice, so
then I guess question 1 is why does pretty put ~ all over??

Then Question 2: If i run the following:

--------
%throughout, sigma = sigma^2
clear;clc;close all;
syms N sigma B u1 u2 y1 y2 real

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

lnf = -N/2*log(2*pi) - N/2 * log(sigma) + -1/(2*sigma)*(y -
B*u)'*(y-B*u);

%first derivatives
pretty(diff(lnf,B))

--------

it gives me the sum of 2 things, which are each the same
because it should just be something in terms of a vector
(the 2 components are what got broken up).  Is there a way
for it to give back the result in vector form?

Thanks,

Dave