Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: making a column into a list

  • To: mathgroup at
  • Subject: [mg22972] Re: [mg22964] making a column into a list
  • From: "Mark Harder" <harderm at>
  • Date: Sat, 8 Apr 2000 14:44:43 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

    I didn't get your attatchment, so let me try some guesses:

    To get a column from a matrix in list form:
matrix = {{1, 2}, {1, 2}, {1, 2}}
column = Column[matrix, 1]
{{1, 2}, {1, 2}, {1, 2}}
{1, 1, 1}

    To create a list from nested lists, use Flatten[]:
columnVec = {{1}, {2}, {3}}
list = Flatten[columnVec ]
Out[268]={{1}, {2}, {3}}
Out[269]={1, 2, 3}

    To create a list of x,y pairs (eg. for ListPlot[]) from separate x & y
lists, I use the following:
x = {1, 2, 3};
y = {4, 8, 12};
pairs = Transpose[{x, y} ]
{{1, 4}, {2, 8}, {3, 12}}

-mark harder

-----Original Message-----
From: Ruchi5ten at <Ruchi5ten at>
To: mathgroup at
Subject: [mg22972] [mg22964] making a column into a list

>in and attempt to create a plot or use graphics i need to generate a list;
>but usually what comes is a column of results from using the DO comand.  i
>don't know how to form a list (instead of column) using a function with has
>the capability of the repetiton of the DO command.
>thank you for your time
>in case i'm not clear i sent an attached program file

  • Prev by Date: Re: Command to get a notebook's directory?
  • Next by Date: Selecting cells
  • Previous by thread: making a column into a list
  • Next by thread: Re: making a column into a list