random list of length 100 with values of list of four [0, 90, 180, 270]

kati's Avatar

kati

25 Nov, 2019 02:44 PM

How can I get such a list?
A sample node connected to a pick node with amount 100 just gives a list of lentgh 4.

  1. Support Staff 1 Posted by john on 25 Nov, 2019 06:06 PM

    john's Avatar

    Hi Kati,

    Use a Random Number node. Set Amount to 100, Start to 0.00, End to 4.00.

    Hook that to a Floor node. This will turn the fractions into integers. (Everything between 0 and 1 becomes a 0, everything between 1 and 2 becomes a 1, etc.). You should now see a list of length 100 with values of 0, 1, 2, or 3.

    Hook that to Multiply node. Set Value2 to 90. That should give you want you want. You can change the Seed value in the Random Numbers node to get different random lists.

    [The Sample node breaks a range into n pieces; it is not a "random sample".]

    Let me know if you have any other questions. I'm happy to help.

    John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 Feb, 2025 11:13 AM
15 Feb, 2025 12:51 PM
06 Feb, 2025 01:37 AM
04 Feb, 2025 06:32 AM
04 Feb, 2025 05:04 AM

 

30 Jan, 2025 09:31 AM
30 Jan, 2025 09:08 AM
30 Jan, 2025 08:40 AM
24 Jan, 2025 07:50 AM
22 Jan, 2025 11:42 PM
21 Jan, 2025 09:43 AM