cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Random Combination Generator from two Integer Filled Vectors?

dsochor
5-Regular Member

Random Combination Generator from two Integer Filled Vectors?

Is there a built in function in MathCAD prime that can create pair combinations of integers from two dissimilar length vectors filled with integers? 

3 REPLIES 3

Mathcad has a random number generator, there has been a fair amount of discussion over the years about how random it really is.

 

I don't know of a built-in function that would do what you want; but using the random number generator to create random indices into each vector shouldn't be terribly difficult.

LucMeekes
23-Emerald III
(To:dsochor)

As Fred indicated, there isn't a built-in function, but it's easy to create one, if you trust the built-in random number generators:

LM_20171219_RandomPick.png

I've take that both arrays are the same length, so they can be columns of the same matrix.

I'm also assuming that you want numbers from different rows...

 

Success!
Luc

Here is my approach with a function with two vector arguments which can be of different size:

Bild.png

Top Tags