MathGroup Archive 2007

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

Search the Archive

Re: Grid

  • To: mathgroup at
  • Subject: [mg80947] Re: Grid
  • From: Szabolcs <szhorvat at>
  • Date: Thu, 6 Sep 2007 05:24:22 -0400 (EDT)
  • Organization: University of Bergen
  • References: <fblk36$qic$>

John wrote:
> I want to create a 9x9 grid that has specified positive integers,
> fewer than 81, entered in specified cells. I used SparseArray to enter
> the specified numbers in the specified cells, but it put a 0 in every
> unspecified cell.How do I convert the zeros to blanks?

If you are trying to format formulae (and not enter valid Mathematica 
expressions), try using CTRL-<Enter> and CTRL-, and replace some of the 
boxes with spaces.

If you wish to generate the formula programmatically with SparseArray[], 
then do something like

sm = SparseArray[{i_, i_} -> i, {10, 10}];

Normal[sm] /. 0 -> "" // MatrixForm

(Note the space between /. and 0)


  • Prev by Date: Bug with 3D graphics lines
  • Next by Date: Re: How to obtain numberical value from an InverseFunction?
  • Previous by thread: Re: Grid
  • Next by thread: How to obtain numberical value from an InverseFunction?