Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1974 > unrolled thread

Re: How to create such a list

Started bySseziwa Mukasa <mukasa@gmail.com>
First post2011-04-29 11:30 +0000
Last post2011-04-29 11:30 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: How to create such a list Sseziwa Mukasa <mukasa@gmail.com> - 2011-04-29 11:30 +0000

#1974 — Re: How to create such a list

FromSseziwa Mukasa <mukasa@gmail.com>
Date2011-04-29 11:30 +0000
SubjectRe: How to create such a list
Message-ID<ipe7g9$qs0$1@smc.vnet.net>
On Apr 28, 2011, at 6:37 AM, Dominic Woerner wrote:

> Hi,
> 
> I like to create a list of the form:
> 0,w[1],...,w[n],w[1]+w[2],...,w[1]+w[n],w[2]+w[3],......,w[1]+...+w[n]
> for arbitrary n
> Is there a neat way to do this?

I don't know about neatness but

Plus@@@Subsets[Table[w[i],{i,n}]]

will do what you want when n has a value.

Regards,
	Sseziwa

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web