MathGroup Archive 2011

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

Search the Archive

Re: Please add me to this group

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117069] Re: Please add me to this group
  • From: Helen Read <readhpr at gmail.com>
  • Date: Wed, 9 Mar 2011 06:57:40 -0500 (EST)
  • References: <AD5346C5-1CE7-4C46-A163-9C2FA305E5C0@BELLSOUTH.NET> <4D71F9E6.8030506@gmail.com> <il52cg$nqv$1@smc.vnet.net>

On 3/8/2011 6:02 AM, Len Horton wrote:
> As a new user of Mathematica and as a purchaser of the Home Edition,
> which does not include any support, I am trying to figure out how to
> take data from an Excel spreadsheet into Mathematica to analyze and
> graph.
>
> I have taken a couple of free seminars on line, but I have not been able
> to figure out how to do just a few basic statistical things.  Each
> column in my spreadsheet is a variable.  In order to produce a histogram
> of one of those variables, I had to open the spreadsheet in Excel, copy
> the column, then paste it into the curly braces inside the Histogram
> function, then eliminate the carriage returns manually while inserting
> commas manually in order to produce the Histogram.  Surely there must be
> a faster way.
>
> In the first place, I cannot tell where to place the Excel file so that
> Mathematica knows where it is.  Anything you could do to get me started
> would be much appreciated.


Save the Mathematica file and the Excel file in the same directory. In 
the Mathematica file, evaluate the following:

SetDirectory[NotebookDirectory[]]

That sets the working directory to the directory where the Mathematica 
notebook lives. Since the Excel file is in the same place, Mathematica 
will find it. Now import the Excel file, and name it something, for 
example call it data.

data=Import["filename.xls"]

(or "filename.xlsx" as the case may be).

Your data is now in the form of a table (essentially a list of lists). 
You can find lots of info about working with lists in the Documentation.

guide/ListManipulation


-- 
Helen Read
University of Vermont


  • Prev by Date: Re: Mathplayer on tablet device
  • Next by Date: Re: results from Array and ParallelArray differ
  • Previous by thread: Re: Please add me to this group
  • Next by thread: Re: Please add me to this group