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


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

Re: How can I concatenate elements

Started byBill Rowe <readnews@sbcglobal.net>
First post2011-06-26 10:26 +0000
Last post2011-06-26 10:26 +0000
Articles 1 — 1 participant

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


Contents

  Re: How can I concatenate elements Bill Rowe <readnews@sbcglobal.net> - 2011-06-26 10:26 +0000

#3305 — Re: How can I concatenate elements

FromBill Rowe <readnews@sbcglobal.net>
Date2011-06-26 10:26 +0000
SubjectRe: How can I concatenate elements
Message-ID<iu71hh$1a5$1@smc.vnet.net>
On 6/25/11 at 5:28 AM, leandrotenfen@hotmail.com (Leandro Tenfen)
wrote:

>I have two lists:

>s1={1,2,3,4,5,6}; s2={c,k};

>How can I concatenate elements of lists as follows:

>s3={1c,2c,3c,4c,5c,6c,1k,2k,3k,4k,5k,6k}

In[6]:= s3 = Flatten[# s1 & /@ s2]

Out[6]= {c,2 c,3 c,4 c,5 c,6 c,k,2 k,3 k,4 k,5 k,6 k}

[toc] | [standalone]


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


csiph-web