MathGroup Archive 2011

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

Search the Archive

Re: Replace

  • To: mathgroup at
  • Subject: [mg121074] Re: Replace
  • From: "Hans Michel" <hmichel at>
  • Date: Fri, 26 Aug 2011 05:23:53 -0400 (EDT)
  • Delivered-to:
  • References: <>


I don't believe you want to replace but you may want to transform your List
into another form for presentation.

You may want to try the following.

data = Table[{i, Random[Integer, {0, 30}]}, {i, 1, 10}];

mform[x_List] := 
  MatrixForm[{x[[2]]}, TableHeadings -> {{ToString[x[[1]]]}, None} ];

Map[mform, data]

The output may visually meet your requirement, but the underlying structure
is a list of MatrixForm elements. 

If you are exporting that result this may not be what you want.

-----Original Message-----
From: Sam Korn [mailto:sam at] 
Sent: Thursday, August 25, 2011 6:07 AM
To: mathgroup at
Subject: [mg121074] Replace

Hi, another stupid question. I have a list, and each element in the list is
a sublist with a pair of integers. How do I replace each element along the
lines of "{5,6}" with "(5|6)"?

I know it's a stupid question, and there's probably something really obvious
I'm missing, but I'm really new to Mathematica.


  • References:
    • Replace
      • From: Sam Korn <>
  • Prev by Date: undocumented limits on subprocesses?
  • Next by Date: Re: Better use of PolynomialReduce?
  • Previous by thread: Re: Replace
  • Next by thread: Re: Replace