Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Grid

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

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)

Szabolcs


  • 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?