Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!news-fra1.dfn.de!newsfeed.pionier.net.pl!news.dialog.net.pl!not-for-mail
From: "uC" <bla.bla@uc.uc>
Newsgroups: comp.soft-sys.matlab
Subject: density matrix conversion - vectorization
Date: Fri, 1 Aug 2008 17:22:09 +0200
Organization: Dialog Net
Lines: 16
Message-ID: <g6v9mp$g0r$1@news.dialog.net.pl>
NNTP-Posting-Host: dynamic-78-8-130-252.ssp.dialog.net.pl
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
X-Trace: news.dialog.net.pl 1217604121 16411 78.8.130.252 (1 Aug 2008 15:22:01 GMT)
X-Complaints-To: abuse@dialog.net.pl
NNTP-Posting-Date: Fri, 1 Aug 2008 15:22:01 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
Xref: news.mathworks.com comp.soft-sys.matlab:483119



the problem is as follows:
- there is a matrix MxN containing density values of some virtual 'entities'
- the matrix needs to be processed and the result should contain the list of 
coordinates of 'entities' coresponding to the location of the given density 
point in MxN matrix (i.e. cooresponding to the coordinates of the density 
point in MxN matrix).

I did it easily using three for loops (one for M, one for N and one for 
density value) however it is quite slow since M and N ~=10k. does anyone has 
any idea how to VECTORIZE it? I intentionally don't publish my code since I 
am asking about the idea (if it is really needed for the discussion I can 
post it).

best wishes,
uC