Re: reading from file
- To: mathgroup at smc.vnet.net
- Subject: [mg80189] Re: reading from file
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 14 Aug 2007 07:11:12 -0400 (EDT)
- Organization: Uni Leipzig
- References: <f9p4sk$qom$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
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?
>
>
>
>
>
>
>