MathGroup Archive 2007

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

Search the Archive

Re: Grid


On Sep 5, 7:58 am, John <j... at lehigh.edu> 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.
eg
Grid[SparseArray[{3, 3} -> 1, {9, 9}, " "], Frame -> All]

Jon McLoone
http://members.wolfram.com/jonm



  • 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