Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How: {{a,b},{1,2,3}} --> {{a,1},{b,2},{a,3}} ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14306] Re: [mg14217] How: {{a,b},{1,2,3}} --> {{a,1},{b,2},{a,3}} ?
  • From: Jurgen Tischer <jtischer at col2.telecom.com.co>
  • Date: Tue, 13 Oct 1998 01:21:21 -0400
  • References: <199810070700.DAA13660@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Michael,
I hope this is not some sort of a test...

In[1]:= li={{a,b},{1,2,3}}
Out[1]= {{a,b},{1,2,3}}

In[2]:= Transpose[Insert[li,li[[1,1]],{1,3}]] Out[2]=
{{a,1},{b,2},{a,3}}

In[3]:= Transpose[{li[[1,{1,2,1}]],li[[2]]}] Out[3]= {{a,1},{b,2},{a,3}}

Jurgen

Michael Kubovy wrote:

> How do I get from {{a,b},{1,2,3}} to {{a,1},{b,2},{a,3}} ?
>
> Thanks,
> |\  /|  / Michael Kubovy, Professor of Psychology, Dept of Psychology |
> \/ | /  Univ of Virginia, Gilmer Hall, Charlottesville, VA 22903-2477 |
> |/\  office (B011): 804-982-4729, lab (B019): -4751, fax: -4766  |    |
> \ HTTP://www.virginia.edu/~mklab/





  • Prev by Date: I Want More Digits in TraditionalForm
  • Next by Date: SUMMARY: How {{a,b,c},{1,2,3,4,5,6,7}}-->{{a,1},{b,2},{c,3},{a,4},...,{a,7},{b,1},...}?
  • Previous by thread: Re: How: {{a,b},{1,2,3}} --> {{a,1},{b,2},{a,3}} ?
  • Next by thread: Re: How: {{a,b},{1,2,3}} --> {{a,1},{b,2},{a,3}} ?