Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3305
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How can I concatenate elements |
| Date | 2011-06-26 10:26 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <iu71hh$1a5$1@smc.vnet.net> (permalink) |
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}
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: How can I concatenate elements Bill Rowe <readnews@sbcglobal.net> - 2011-06-26 10:26 +0000
csiph-web