Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Bogey
Date: Sat, 25 Oct 2008 21:12:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <ge0231$lu$1@fred.mathworks.com>
References: <gdvjlp$kij$1@fred.mathworks.com> <gdvoje$gnn$1@fred.mathworks.com> <gdvq28$482$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1224969122 702 172.30.248.35 (25 Oct 2008 21:12:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 25 Oct 2008 21:12:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:497241


"b b" <bogey4@gmail.com> wrote in message <gdvq28$482$1@fred.mathworks.com>...
> .... I meant to write:
> ....
> for n = 1:2,
>   for i = 1:2,
>     tot = tot+ ksi(n,i)*X(:,n)*Y(i,:);
>   end;
> end;

  In that case try this:

tot = X*ksi*Y;

It should give the correct answer.  Whether it is faster you will have to determine for yourself.  You can experiment with parentheses: (X*ksi)*Y as compared with X*(ksi*Y).

Roger Stafford