Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Bogey
Date: Sun, 26 Oct 2008 20:19:02 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 21
Message-ID: <ge2jbm$q98$1@fred.mathworks.com>
References: <gdvjlp$kij$1@fred.mathworks.com> <gdvoje$gnn$1@fred.mathworks.com> <gdvq28$482$1@fred.mathworks.com> <ge0231$lu$1@fred.mathworks.com> <ge2b76$msj$1@fred.mathworks.com> <ge2dju$bjg$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
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 1225052342 26920 172.30.248.35 (26 Oct 2008 20:19:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 26 Oct 2008 20:19:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:497328


"b b" <bogey4@gmail.com> wrote in message <ge2dju$bjg$1@fred.mathworks.com>...

> 
> Any ideas?

Here is one:

X = [1 2 3 4;
     5 4 3 2];
ksi = [ 1 2 2 1;
       2 3 3 2;
       1 3 5 1;
       1 2 2 2];
muEst = [2 3 4 5;
         6 5 4 4];

% Engine
[N I]=ndgrid(1:4,1:4);
tot = sum((X(:,N)-muEst(:,I)).^2,1) * ksi(:)

% Bruno