Path: news.mathworks.com!not-for-mail
From: "Andreas Sprenger" <sprenger_a@yahoo.de>
Newsgroups: comp.soft-sys.matlab
Subject: conv2 in R2008b very slow
Date: Thu, 18 Dec 2008 18:14:03 +0000 (UTC)
Organization: Universit&#228;t L&#252;beck
Lines: 24
Message-ID: <gie3tb$qen$1@fred.mathworks.com>
Reply-To: "Andreas Sprenger" <sprenger_a@yahoo.de>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1229624043 27095 172.30.248.37 (18 Dec 2008 18:14:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 18 Dec 2008 18:14:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 37848
Xref: news.mathworks.com comp.soft-sys.matlab:507826


I just realized that conv2 is very slow in 2008b. I created a 2D filter by

GaussWidth = [23, 180];
F = customgauss([GaussWidth(2), GaussWidth(2)], GaussWidth(1), GaussWidth(1), 0, 0, 1, [0 0]);
% custumgauss -> see FileExchange

% Array of zeros
G1 = zeros(600, 1000);

% Set one single point 
G1(300, 400) = 1.5;

% in R2008a: 
tic; G2 = conv2(G1, F, 'same'); toc
>> Elapsed time is 0.014846 seconds.

% in R2008b:
tic; G2 = conv2(G1, F, 'same'); toc
>> Elapsed time is 17.831022 seconds.

Same machine, no background activity, reproducable. Why?

Andreas