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/