Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: TOUGH Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18299] Re: TOUGH Question
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Fri, 25 Jun 1999 22:24:09 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <7ku0vc$9ar@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 24 Jun 1999, Chris WeiF wrote:

> I read a file with FastBinaryRead into a list called data.
> How can I manipulate these data ?
> I want to delete selected position and copy other Byte to a second List like
> {nx,ny} to get a graph with PlotList.
> But I always get the error message: Partition::normal: Nonatomic expression
> expected at position 1 in Partition[data, 80].
>
> How can I convert these list int a nonatomic expression.
> Or can I read the file into an other construct (like Table or other).
>
> Now the code witch is causing the problems:
> >  stream = OpenReadBinary[FileName];
> >  data = ReadListBinary[stream,Byte];
> >  Partition[data,80];
>
> The Output is: Partition::normal: Nonatomic expression expected at position
> 1 in Partition[data, 80].

Please provide a valid return e-mail address with your postings.  This is
a moderated newsgroup in which anonymity is not a necessity.

Are you really supplying the symbol FileName as an argument?  This is a
built-in symbol that resides in the System` context.  You should avoid
creating symbol names that conflict with built in objects.

If Partition[] is complaining about the first argument not being a
"nonatomic expression", then it stands to reason that the argument must be
an atomic object:

Symbol
String
Integer
Rational
Real
Complex

The first thing you should do is examine data to see if it is one of these
things.  If that is the case, then check to see if whether the data in
your source file is stored as you would expect it to be. 

--
P.J. Hinton
Mathematica Programming Group           paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.



  • Prev by Date: Re: Graphic simple?
  • Next by Date: Re: Newbie question
  • Previous by thread: Re: TOUGH Question
  • Next by thread: phasing out support for older versions