MathGroup Archive 2003

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

Search the Archive

Substitution in BinLists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41435] Substitution in BinLists
  • From: "Mark E. Berres" <markb at ravel.zoology.wisc.edu>
  • Date: Mon, 19 May 2003 05:14:29 -0400 (EDT)
  • Organization: University of Wisconsin, Madison
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
I'm trying to substitute a zero (0) for bins that are empty when using
BinLists:

In[192]:= <<Statistics`DataManipulation`
In[193]:= a={1,2,3,4,10};
In[194]:= BinLists[a,{0,10,1}]

Out[194]:= {{1},{2},{3},{4},{},{},{},{},{},{10}}

What I would like output is {1,2,3,4,0,0,0,0,0,10}.
Flatten nearly gets me there but omits the empty bins {}: {1,2,3,4,10}.

Thanks
-Mark




  • Prev by Date: RE: transform
  • Next by Date: new user installation problem
  • Previous by thread: Re: SelectedNotebook[ ] under Mac OSX gives wrong answer
  • Next by thread: Re: Substitution in BinLists