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

MathGroup Archive 2005

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

Search the Archive

Re: Matrix question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60300] Re: Matrix question
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 10 Sep 2005 22:36:19 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <dfudth$1qo$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Table[If[Random[]<0.1,1,0],{10},{10}]

will create a matrix with 10 % 1 and 90 % zeros.

Regards
  Jens

"sandog" <sandog at mail.gr> schrieb im Newsbeitrag 
news:dfudth$1qo$1 at smc.vnet.net...
|i want to create a NxN matrix with zeros but i 
want a percentage of the matrix spots to be one at 
random spots any idea? cause i have no clue how to 
do that.
| Any help appreciated thx .
| 



  • Prev by Date: Re: Matrix question
  • Next by Date: Re: Matrix question
  • Previous by thread: Re: Matrix question
  • Next by thread: Re: Matrix question