"expanding a list"
- To: mathgroup at smc.vnet.net
- Subject: [mg57860] "expanding a list"
- From: Mark Coleman <mark at markscoleman.com>
- Date: Fri, 10 Jun 2005 02:29:26 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Greetings, I'd like to construct a list as follows. Say I have a list of reals {x1,x2,x3,...xn}, and another list of integers {r,s}. I'd like to make a new list {{x1,x1,x1,...},{x2,x2,x2....},{x3,x3,x3,...},....,{xn,xn,xn,...}}, where the first sublist is of length r, and the remaining sublists are of length s. Thanks, -Mark
- Follow-Ups:
- Re: "expanding a list"
- From: Ken Levasseur <klevasseur@mac.com>
- Re: "expanding a list"
- From: János <janos.lobb@yale.edu>
- Re: "expanding a list"