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


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

Re: How can I concatenate elements

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-06-26 21:39 +0000
Last post2011-06-26 21:39 +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.


Contents

  Re: How can I concatenate elements DrMajorBob <btreat1@austin.rr.com> - 2011-06-26 21:39 +0000

#3331 — Re: How can I concatenate elements

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-06-26 21:39 +0000
SubjectRe: How can I concatenate elements
Message-ID<iu88ve$7d1$1@smc.vnet.net>
s1 = {1, 2, 3, 4, 5, 6};
s2 = {c, k};
Sort@Flatten@Outer[Times, s1, s2]

{c, 2 c, 3 c, 4 c, 5 c, 6 c, k, 2 k, 3 k, 4 k, 5 k, 6 k}

Bobby

On Sat, 25 Jun 2011 04:28:53 -0500, Leandro Tenfen  
<leandrotenfen@hotmail.com> wrote:

> Hi,
>
> 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}
>
> Many Thanks!
>
>


-- 
DrMajorBob@yahoo.com

[toc] | [standalone]


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


csiph-web