Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Need to make code more Efficient
Date: Tue, 9 Feb 2010 13:08:02 +0000 (UTC)
Organization: University of Glasgow
Lines: 10
Message-ID: <hkrmni$1ie$1@fred.mathworks.com>
References: <hkrdqk$a6s$1@fred.mathworks.com> <hkrlju$jsr$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1265720882 1614 172.30.248.37 (9 Feb 2010 13:08:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Feb 2010 13:08:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1585470
Xref: news.mathworks.com comp.soft-sys.matlab:605725


Hi 

cd = 2
  kd = 16

Basically the code looks at 16 values  either side of the cell under test and returns the average ( ignoring the 2 cells ( kd)  imeediate to the cell) so that will be (500*40) of doing this averaging routine

the code is taking at least 15 seconds to run through which is way to long i need to speed it up.  I thought i was using vectorized loops could you explain what i am doing wrong?

Thanks