Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: conv2(..) fault ???
Date: Mon, 12 Mar 2012 07:28:13 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <jjk8id$nbh$1@newscl01ah.mathworks.com>
References: <jjk5d7$ecs$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1331537293 23921 172.30.248.45 (12 Mar 2012 07:28:13 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 12 Mar 2012 07:28:13 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:760637

"Le Tuan" wrote in message <jjk5d7$ecs$1@newscl01ah.mathworks.com>...
> I write:
> I=[-5 5 0 5;
>      5 5 0 0;
>      0 5 0 5;
>      5 5 5 5]
> 
> h=[-1 -1 -1;
>        0 0 0;
>        1 1 1]
> 
> c=conv2(I,h,'valid')
> 
> and output of c is:
> -5    0
> -5  -10
> c(1,2), c(2,1), c(2,2) is right results. But why c(1,1)=-5, I think it must be 5 ???
- - - - - - - - -
  I disagree, c(1,1) = -5 looks right to me:

 (-5)*1+5*1+0*1+5*0+5*0+0*0+0*(-1)+5*(-1)+0*(-1) = -5

Roger Stafford