Re: Short Doesn't Work
- To: mathgroup at smc.vnet.net
- Subject: [mg19284] Re: Short Doesn't Work
- From: jsobel at sdav01.seinf.abb.se (Jarl R Sobel)
- Date: Thu, 12 Aug 1999 22:34:42 -0400
- Organization: ABB Automation Products
- References: <7or5tb$15f@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <7or5tb$15f at smc.vnet.net>, Lawrence Walker <lwalker701 at earthlink.net> wrote: > I am having problems with the Short[] function. > > In v3, the following, > > randDir:=2 Random[Integer]-1; > randWalk[n_]:=NestList[#+randDir&,0,n-1]; > (walk=randWalk[1000] ) // Short > > returns > > <<1>> > > I was expecting more than this. It still doesn't work if I > use Short[expr,5]. > > What's going on? > > Lawrence > Try: walk//Shallow this yields: {0, 1, 0, 1, 0, -1, -2, -1, -2, -1, \[LeftSkeleton]990\[RightSkeleton]} which I believe is what you want. (at least in Mathematica 4.0) Jarl