MathGroup Archive 2009

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

Search the Archive

Re: Convert 2D table to 1D list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103555] Re: Convert 2D table to 1D list
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 27 Sep 2009 23:06:49 -0400 (EDT)

On 9/27/09 at 7:31 AM, canopus56 at yahoo.com (canopus56) wrote:

>I have a 2D table that I would like to use descriptive statistics
>on, e.g. median, stddev, histogram, etc.

>How do I convert the 2D table into a 1D list that can be operated on
>by descriptive statistics on all the elements in the 2D table?

>================= The data ==================

>In[127]:= tabROLOROI2 Out[127]= {{1115.67,1169.42,1243.33,1270.6},
>{1169.39,1220.86,1261.8,1173.26},{1133.4,1173.71,1168.89,1174.48}}

Use Flatten. For example, the overall median of your data can be
computed as:

In[7]:= tabROLOROI2 = {{1115.67, 1169.42, 1243.33, 1270.6}, {1169.39,
     1220.86, 1261.8, 1173.26}, {1133.4, 1173.71, 1168.89, 1174.48}};

In[8]:= Median[Flatten@tabROLOROI2]

Out[8]= 1173.49



  • Prev by Date: Mathematica, .NET/Link, and Mac OS?
  • Next by Date: Re: Convert 2D table to 1D list
  • Previous by thread: Re: Convert 2D table to 1D list
  • Next by thread: Re: Convert 2D table to 1D list