Path: news.mathworks.com!not-for-mail
From: "b b" <bogey4@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Bogey
Date: Sat, 25 Oct 2008 18:55:04 +0000 (UTC)
Organization: university of Guelph
Lines: 22
Message-ID: <gdvq28$482$1@fred.mathworks.com>
References: <gdvjlp$kij$1@fred.mathworks.com> <gdvoje$gnn$1@fred.mathworks.com>
Reply-To: "b b" <bogey4@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1224960904 4354 172.30.248.38 (25 Oct 2008 18:55:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 25 Oct 2008 18:55:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 944946
Xref: news.mathworks.com comp.soft-sys.matlab:497228

Thanks Roger, that's exactly what I was looking for!  Unfortunately, I missed one variable in the code I posted.  I meant to write:

tot = 0;
for n = 1:2,
  for i = 1:2,
    tot = tot+ ksi(n,i)*X(:,n)*Y(i,:);
  end;
end;

Where 
ksi = [1 2 ;2 3];

Any suggestions?

Bruce


> ------
>  tot = sum(X,2)*sum(Y,1);
> 
> Roger Stafford