Re: How can I get list form like this
- To: mathgroup at smc.vnet.net
- Subject: [mg91869] Re: How can I get list form like this
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Thu, 11 Sep 2008 06:13:43 -0400 (EDT)
- Organization: University of Bergen
- References: <ga82tt$rh1$1@smc.vnet.net>
863 wrote: > Hi,guys > > As we know f/@Range[n] gives a list {f[1],f[2],f[3],=85=85}; > Here what I want is a list form like this{f[[1]],f[[2]],=85=85}(*It's too > tedious to type one by one*) > It means the 1st,2nd,=85=85part of list f. > Looks similar to each other, however I can't figure it out. > How to do this ? > If you need to slice lists, use one of the following: f[[ Range[n] ]] f[[ 1;;n ]] f[[ ;;n ]] (The last two will only work in Mathematica 6)