|
|
Re: array with random not repeated numbers
Posted:
Nov 10, 2009 6:49 PM
|
|
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <45a8dd1f-8806-4903-ac8f-6a25382539f0@j19g2000vbi.googlegroups.com>... > On Nov 10, 5:04?pm, "Patrick Diviacco" <patrick.divia...@gmail.com> > wrote: > > hi, > > > > how can I generate an array with random numbers (given a min and max) ? > > Important: they have to be not repeated. > > > > thanks > > ----------------------------------------------------------- > Did you see the rand() function? > So how about something like this > randomArray = minValue + (maxValue-MinValue)*rand(rows, columns);
Is this code avoiding duplicates ?
|
|