|
Prev: mexw32 sharing violation
Next: Beampattern 3D plot
From: Robbie Janssen on 6 May 2008 05:46 I still don't get the same result Yumnam. I am using Matlab release 7.5.0(R2007b), it should be a strange thing but maybe there's where the error is? I've posted a picture at http://www.student.tue.nl/t/r.j.m.janssen/FILTERS.jpg The kernel (or mask) is defined as [0 -1; 1 0] Can you maybe take a look at it and explain why there's still a difference? Regards, Robbie Yumnam Kirani Singh <kirani.singh(a)gmail.com> wrote in message <30971887.1199861291430.JavaMail.jakarta(a)nitrogen.mathforum. org>... > Sorry, I have made a mistake in the explanation of filter2 and conv2. The two are equivalent under the following cases. > >>xf=filter2(fliplr(mask),x); % using as conv2 > >>xc=conv2(x,mask, 'same'); > then xc and xf are the same. > In the other way, > >>xc=conv2(x,fliplr(mask), 'same'); % using as filter2 > >>xf=filter2(mask,x); > here also, xc and xf will give the same result.
From: Robbie Janssen on 6 May 2008 06:01 Got it, you should (at least not in my Matlab version) transpose the mask instead of just flipping it from left to right. See matlab-help for filter2 "Robbie Janssen" <r.j.m.janssen(a)student.tue.nl> wrote in message <fvp9cr$1ca$1(a)fred.mathworks.com>... > I still don't get the same result Yumnam. I am using Matlab > release 7.5.0(R2007b), it should be a strange thing but > maybe there's where the error is? I've posted a picture at > http://www.student.tue.nl/t/r.j.m.janssen/FILTERS.jpg > > The kernel (or mask) is defined as [0 -1; 1 0] > > Can you maybe take a look at it and explain why there's > still a difference? > > Regards, > > Robbie > > Yumnam Kirani Singh <kirani.singh(a)gmail.com> wrote in > message > <30971887.1199861291430.JavaMail.jakarta(a)nitrogen.mathforum. > org>... > > Sorry, I have made a mistake in the explanation of > filter2 and conv2. The two are equivalent under the > following cases. > > >>xf=filter2(fliplr(mask),x); % using as conv2 > > >>xc=conv2(x,mask, 'same'); > > then xc and xf are the same. > > In the other way, > > >>xc=conv2(x,fliplr(mask), 'same'); % using as filter2 > > >>xf=filter2(mask,x); > > here also, xc and xf will give the same result. >
|
Pages: 1 Prev: mexw32 sharing violation Next: Beampattern 3D plot |