MathGroup Archive 2007

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

Search the Archive

Re: Re: Copy and Pasting Tables into Spreadsheet

You're apparently using a different language than the rest of us:

prob = {.4, .6};



No List output there!

However, if prob[[1]] IS a list for whatever reason, then fix it with a 

prob[[1]] /. {{x_} :> x}


On Tue, 20 Nov 2007 02:45:15 -0600, <gregory.lypny at> wrote:

> Thank you for the tip, Bill.
> Probably my inexperience, but it still seems like a lot of bother.  If
> something displays as two dimensional (R rows, C columns) when using
> TableForm, it seems to me that you should be able to cut and paste it
> as such for other applications, despite keeping its greater depth
> within Mathematica.
> I found the source of the problem in my case.  I use two
> probabilities, prob = {.4, .6}, in my calculations to make the
> tables.  The problem arises because prob[[1]] returns {.4} rather than
> the simple scalar, .4, and prob[[2]] returns {.6} rather than .6, in
> other words, lists with one element each.  Now I know that this is
> what Mathematica is supposed to do: return a list when given a list to
> process.  If I redo my tables using scalars, prob1=.4 and prob2 = .6,
> there is no more problem with depth.  Is there a way to tell
> Mathematica to return a scalar in all situations when the result would
> otherwise be a list with only one element?
> Regards,


DrMajorBob at

  • Prev by Date: DataRange
  • Next by Date: Re: addons in Mathematica 6???
  • Previous by thread: Re: Copy and Pasting Tables into Spreadsheet
  • Next by thread: Re: Copy and Pasting Tables into Spreadsheet