Re: combine a list of lists with another list of lists
- To: mathgroup at smc.vnet.net
- Subject: [mg40905] Re: combine a list of lists with another list of lists
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 23 Apr 2003 05:18:02 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <b858o8$5s6$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
coord = {{{x1, y1}, {x1, y2}, {x1, y3}}, {{x2, y1}, {x2, y2}, {x2, y3}},
{{x3,
y1}, {x3, y2}, {x3, y3}}};
val = {{z1, z2, z3}, {z4, z5, z6}, {z7, z8, z9}};
and
Apply[Append , Transpose[{coord, val}, {3, 1, 2}], {2}]
does it.
Regards
Jens
sean kim wrote:
>
> hello group
>
> I have a bit of list operation problem.
>
> let's say we have two lists, one list of lists of z values over time.
> then another list of lists of x and y values over time
>
> as follows for example,
>
> {{z1, z2, z3}, {z4, z5, z6}, {z7, z8, z9}}
>
> the number of the lists withing this list varies in actual problem
>
> also condsider the following list of lists.
>
> {{{x1, y1}, {x1, y2}, {x1, y3}},
> {{x2, y1}, {x2, y2}, {x2, y3}},
> {{x3, y1}, {x3, y2}, {x3, y3}}}
>
> now i would like to generate a new list that is of the form {xn, yn,
> zn} such that it can be plotted using ListPlot command
>
> as..
>
> {{{x1, y1, z1}, {x1, y2, z2}, {x1, y3, z3}},
> {{x2, y1, z4}, {x2, y2, z5}, {x2, y3, z6}},
> {{x3, y1, z7}, {x3, y2,z8}, {x3, y3,z9}}}
>
> but it seems to me listplot3D will only plot if it's a single list of
> lists of xyz values. not multiple lists of lists as i have defined
> above.
>
> how can I first generate a new list using the preexisting list of lists
> as above and then plot them?
>
> much appreciate any help and comments.
>
> thanks again all.
>
> sean from UCIrvine
>
> =====
> when riding a dead horse, some dismount.
>
> while others...
>
> insist on how this is the way THIS dead horse has always been ridden
>
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com