Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg80951] Re: Grid
  • From: Jon McLoone <jonm at>
  • Date: Thu, 6 Sep 2007 05:26:25 -0400 (EDT)
  • References: <fblk36$qic$>

On Sep 5, 7:58 am, John <j... at> 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?
> John

Use the third argument for SparseArray that gives the default value.
Grid[SparseArray[{3, 3} -> 1, {9, 9}, " "], Frame -> All]

Jon McLoone

  • Prev by Date: Re: Grid
  • Next by Date: Re: What is $MaxNumber on a 64 bit Computer?
  • Previous by thread: Re: Grid
  • Next by thread: Re: Grid