MathGroup Archive 2005

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

Search the Archive

Transpose to multiple lists


First Q:Transpose to multiple lists
a={3,6,3,2}
b={9,8,7,6}
Join[Transpose[{Range[Length[a]], a}],Transpose[{Range[Length[b]], b}]]

Out[]={{1, 3}, {2, 6}, {3, 3}, {4, 2}, {1, 9}, {2, 8}, {3, 7}, {4, 6}}
what are the concise solutions other than this dumby solution

Second Question: transposing Range to every sublist
lst={{4,6,3},{6,8,7,3},{9,4}}
how could i obtain the output:
{{1,4},{2,6},{3,3},{1,6},{2,8},{3,7},{4,3},{1,9},{2,4}}
thanks
konstant.


  • Prev by Date: Re: exploded plots
  • Next by Date: NMinimize--problem with a min-max problem
  • Previous by thread: Re: exploded plots
  • Next by thread: Re: Transpose to multiple lists