Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Using ListCorrelate with Inner

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87284] Using ListCorrelate with Inner
  • From: Art <grenander at gmail.com>
  • Date: Sun, 6 Apr 2008 06:45:05 -0400 (EDT)

I have a matrix of filter vectors h which I would like to
ListCorrelate with a column of data vectors d as (pseudocode) r =
Inner[ListCorrelate, h, d, Plus]. I haven't been able to write this in
a neat form with Inner, which I suspect will also be faster than the
below:

{l,m,n,o} = {5,5,8,1000};
h = RandomReal[1., {l,m,n}];
d = RandomReal[1., {m,o}];

r = Total /@ Table[ListCorrelate[h[[i, j]], d[[j]]], {i, l}, {j,m}]

Thanks,
Art


  • Prev by Date: Re: Colored Output
  • Next by Date: Re: How to display parameter in animation?
  • Previous by thread: Re: A small syntax error causing Kernel crash, Version 6.0.1
  • Next by thread: Re: Using ListCorrelate with Inner