|
From: | Ganesh Kini |
Subject: | Re: Generation of random number which needs to be passed to an array |
Date: | Tue, 16 Jun 2020 00:24:54 +0200 |
On Mon, Jun 15, 2020 at 5:43 PM Ganesh Kini <ganeshrkini19@gmail.com> wrote:I want all the sets of randomly mixed values of A and B and then I need to iterate them
So, there are two questions1) How do I randomly pick one set of A and B and then pass it on the array?
2) How do I iterate all the sets of values without using for loop?On Mon, Jun 15, 2020 at 11:29 PM Doug Stewart <doug.dastew@gmail.com> wrote:On Mon, Jun 15, 2020 at 4:55 PM Ganesh Kini <ganeshrkini19@gmail.com> wrote:Sorry, Autocorrect!How can I iterate all the values without using for loop?Since there are many combinations I want to avoid for loop. Please let me knowOn Mon, Jun 15, 2020 at 10:47 PM Ganesh Kini <ganeshrkini19@gmail.com> wrote:Thank youI can i iterate all the values without using for loop,SInce there are many combinations I want to avoid for loopOn Mon, Jun 15, 2020 at 10:44 PM Doug Stewart <doug.dastew@gmail.com> wrote:I am not sure what you want, but this might help.On Mon, Jun 15, 2020 at 4:33 PM Ganesh Kini <ganeshrkini19@gmail.com> wrote:I have 2 variables named A and BA has the range from -0.2 to 2.2B has the range from -3.2 to 0.2I need all the possible to combinations of A and B in 0.1 stepsfor exampleA B0.1 0.2-0.1 -0.3 and so onHow do I randomly generate this?
In your first question you hat the word "random" so I thought you wanted a random choice , in the range.Now I see that you don't wand random.So what do you want?Just a set of all possible combinations? do you know how big that will be?--This looks like homework.I don't do homework questions.I did show you how to do part of your question, and now I am out!--
[Prev in Thread] | Current Thread | [Next in Thread] |