Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15784 > unrolled thread
| Started by | "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> |
|---|---|
| First post | 2011-02-09 07:12 +0000 |
| Last post | 2011-02-09 07:12 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: ListCorrelate and Powers "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> - 2011-02-09 07:12 +0000
| From | "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> |
|---|---|
| Date | 2011-02-09 07:12 +0000 |
| Subject | Re: ListCorrelate and Powers |
| Message-ID | <iiteo0$jlo$1@smc.vnet.net> |
How about:
In[252]:= ListCorrelate[{1, 2, 3, 4}, {a, b, c, d, e}, {1, -1}, {0},
Power[#2, #1] &, Plus]
Out[252]= {a + b^2 + c^3 + d^4, b + c^2 + d^3 + e^4}
Cheers -- Sjoerd
On Feb 8, 11:08 am, "Harvey P. Dale" <h...@nyu.edu> wrote:
> It is easy to use ListCorrelate to generate the sum of a list
> with each element multiplied by the successive terms in the "kernel."
> For example, ListCorrelate[{1,2,3,4},{a,b,c,d,e}] produces {a+2 b+3 c+4
> d,b+2 c+3 d+4 e}. Is there any way, using the optional 5th and 6th
> parameters, to generate this list instead:
> {a+b^2+c^3+d^4,b+c^2+d^3+e^4}?
> Thanks.
> Harvey
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visithttp://www.messagelabs.com/email
> ______________________________________________________________________
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web