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: 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


  • Prev by Date: Re: Automatic Display in MatrixForm
  • Next by Date: incompatibilities between releases of Mathematica (was: Mathematica Link for Excel and Excel 2000)
  • Previous by thread: Re: Short Doesn't Work
  • Next by thread: RE: Defining a function P[A_ | B_]:=f[A,B] overriding A lternatives