MathGroup Archive 2007

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

Search the Archive

Re: reading from file


Hi,

try

data=Get[datafile]

Regards
   Jens

Jesse Sheinwald wrote:
> This is an example of reading from a file that I took from the book "An
> Introduction to Programming with Mathematica"  by Wellin.  The author
> provides data for a number of examples and the reader is instructed to store
> this date either in the BaseDirectory or the UserBaseDirectory.  I entered
> the Mathematica code (v6) as this with the programs response...
> 
> datafile =
> ToFileName[{$BaseDirectory, "Applications", "IPM3", "DataFiles"},
> "dataset.m"]
> 
> Out[4]=
> 
> C:\Documents and Settings\All Users\Application
> Data\Mathematica\Applications\
> \IPM3\DataFiles\dataset.m
> 
> data = Import[datafile, "Table"]
> 
> $Failed
> 
> The idea is to read in file dataset.m and to use it as data.
> 
> In the event this was some v6 quirk, I tried this with Mathematica 5.2 and
> it also didn't work
> 
> What am I doing wrong?
> 
> 
> 
> 
> 
> 
> 


  • Prev by Date: Re: Setting plot options with RuleDelayed/Rule does not work
  • Next by Date: Hardware for Mathematica 6.0
  • Previous by thread: Re: reading from file
  • Next by thread: Re: reading from file