Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*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 2002

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

Search the Archive

Get rid of unwanted {}

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37258] Get rid of unwanted {}
  • From: "JJJ Shen" <jushen1 at hotmail.com>
  • Date: Fri, 18 Oct 2002 05:18:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, Sorry for asking again a question regarding to the unwanted {}.

I wrote a function, f, which accepts input having a form like:

gg={{ob1},{ob2},{ob3}};

However, the output of f having a form like:

f[gg] gives {{{ob11}, {ob12}, {ob13}},{{ob21}, {ob22}, {ob23}, {ob24}}, ... 
,{{obn1}, {obn2}, {obn3}}}

where the number of objects in each layer can vary.

The additional "intermediate" layer in the output of f prevents the feedback 
to f, when use function like nest.

I looked up and tried several method, and it seems to be easy to get rid of 
all inner layers, or the innerest layer, or the outmost layer (use 
Sequence).

Is there a way to get rid of the middle layer as describe above?

Thanks very much for your kind help.

Sincerely,
JT




_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband.  
http://resourcecenter.msn.com/access/plans/freeactivation.asp



  • Prev by Date: Re: List processing
  • Next by Date: Re: grouping and averaging {x,y} pairs of data
  • Previous by thread: Re: Checking the Results of NDSolve
  • Next by thread: Re: Get rid of unwanted {}