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


Groups > comp.soft-sys.math.mathematica > #5668

Re: How to create this kind of list

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!posts.news.twtelecom.net!nnrp2.twtelecom.net!not-for-mail
From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to create this kind of list
Date Sun, 16 Oct 2011 11:10:05 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <j7ee2d$ei5$1@smc.vnet.net> (permalink)
Lines 23
NNTP-Posting-Date 16 Oct 2011 10:13:39 GMT
NNTP-Posting-Host c24dd8b7.news.twtelecom.net
X-Trace DXC=M]RoBO3hUIkE0G1fKX\WG`C_A=>8kQj6mm^eQlV`f18ghn:Nb\3Eac`EFiONJ7[Gof@`NKW0cfHBl
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:5668

Show key headers only | View raw


On 10/15/11 at 6:04 AM, szymon.roziewski@gmail.com (Szymon Roziewski)
wrote:

>Hello there, I am thinking about creating such a list. I have 2
>lists with the same number of elements. The idea is to create one
>list which was taken from these previous two ones in the following
>way: Take one element of the first list and one from another and put
>it into result list {{x1,y1},{x2,y2},...,{xn,yn}}. Input lists:
>A={x1,x2,...,xn} B={y1,y2,...,yn}

With same length lists, what you want is easily done in a number
of ways. Probably the most straight forward would be

Transpose@{a,b}

other ways include

MapThread[List, {a,b}]
Partition[Riffle[a,b],2]



Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How to create this kind of list Bill Rowe <readnews@sbcglobal.net> - 2011-10-16 11:10 +0000

csiph-web