Re: TOUGH Question
- To: mathgroup at smc.vnet.net
- Subject: [mg18275] Re: TOUGH Question
- From: Guilherme Roschke <gr at network3.entropy.upenn.edu>
- Date: Fri, 25 Jun 1999 15:05:21 -0400
- Organization: University of Pennsylvania
- References: <7ku0vc$9ar@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
> > 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]. I think whats happening is ReadListBinary is putting {} around your data which is alread a list. Try seeing what the Dimensions[data] gives you. it might be something like {1,32,32} (if you file contains a 32X32 array). This might cause data to be atomic (ie be a list of one element (your array) rather than simply your array). if this is the case, Flatten[data,1] will fix this. Or this might not be the problem, although it sounds familiar. -Guilherme ************************************************* Guilherme Roschke * Programmer * Dept. of Anesthesia * University of Pennsylvania Medical School * gr at network3.entropy.upenn.edu * *************************************************