compare 5 numbers


    Sep 02 2007 | 11:03 am
    Hi. I?m using five random objects to create 5 numbers every 30000 millisecond What i have difficulties figuring out is how to make a comparison if one number is equal to another number in the list. Or if several of the numbers is equal. Any idea? Thanks Richardo

    • Sep 02 2007 | 11:38 am
    • Sep 02 2007 | 11:46 am
      if you want them all to be differnt you can use an urn object instead of random, and have it do it every 6seconds instead, and have them sent to something like pack with the last number sent going to the first inlet, to dump the list at the end of 30sec, with no duplicates
      On 9/2/07, Richardo del Pozo wrote: > > Hi. > I?m using five random objects to create 5 numbers every 30000 millisecond > What i have difficulties figuring out is how to make a comparison if one number is equal to another number in the list. Or if several of the numbers is equal. > Any idea? > Thanks Richardo > >
    • Sep 02 2007 | 12:01 pm
      Thank you so much but I do not think i can use those methods. I want it to generate 5 different numbers every 30000 millisecond between 1- 40. these numbers will be unpacked and used to read images that has the corresponding number.
      Example. if 2, 3, 33, and 12 is chosen it will display pictures 2, 3 33 and 12. Therefor i cant have that to of the numbers are equal. Then it will fail to create five different images and displaying to, three, four or even five equal images.
      i do not know if i explain it very well...... Sorry Richardo
    • Sep 02 2007 | 12:20 pm
      On 2 Sep 2007, at 13:01, Richardo del Pozo wrote:
      > Thank you so much but I do not think i can use those methods. > I want it to generate 5 different numbers every 30000 millisecond > between 1- 40.
      How about something like:
      (i) generate number N1, between 1 and 40. (ii) generate number N2, between 1 and 39. If N2 >= N1, N2 = N2 + 1 (iii) generalise. (Left as an exercise: this step is more complex because you have more partitions.)
      -- N.
      Nick Rothwell / Cassiel.com Limited www.cassiel.com www.myspace.com/cassieldotcom www.loadbang.net
    • Sep 02 2007 | 12:21 pm
      the example i gave you would do just that, it would produce a list of 5 non-duplicate numbers every 30seconds
      youd have to modify it a bit to make the counter reset, and to clear the urn every so often
      On 9/2/07, Richardo del Pozo wrote: > > Thank you so much but I do not think i can use those methods. > I want it to generate 5 different numbers every 30000 millisecond between 1- 40. > these numbers will be unpacked and used to read images that has the corresponding number. > > Example. if 2, 3, 33, and 12 is chosen it will display pictures 2, 3 33 and 12. > Therefor i cant have that to of the numbers are equal. Then it will fail to create five different images and displaying to, three, four or even five equal images. > > i do not know if i explain it very well...... > Sorry > Richardo >
    • Sep 02 2007 | 12:28 pm
      yes i figured it out after a bit, thank you very much guys.
    • Sep 04 2007 | 12:04 pm
      Richardo del Pozo schrieb: > Example. if 2, 3, 33, and 12 is chosen it will display pictures 2, 3 > 33 and 12. Therefor i cant have that to of the numbers are equal. > Then it will fail to create five different images and displaying to, > three, four or even five equal images.
      this will go through all before it repeats an image...
      Stefan
      -- Stefan Tiedje------------x------- --_____-----------|-------------- --(_|_ ----|-----|-----()------- -- _|_)----|-----()-------------- ----------()--------www.ccmix.com