Skip to main content
16-Pearl
April 25, 2019
Solved

random vector lenght populated with random values

  • April 25, 2019
  • 1 reply
  • 1591 views

To all,

 

I am looking/thinking about something and would like to know if it’s possible to create vectors populated with random numbers. I have only started thinking about it so don’t throw a stone at me if it’s so obvious.

 

In the attached mcad 15 sheet, I have an equation which is the sum of j-values (j=3 in my example)

Is there a way of generating the values in the vectors in a random way so that the vector length is changed by the user? For example I may want a 1st pass with j=10, then j=20 and maybe j=100

 

The constraint is that for the vector fnv: f1 < f2 <f3<…<fj

 

Would this be better set-up as a MonteCarlo problem using mcad buil-in function

 

Thanks in advance

Best answer by terryhendicott

Hi,

 

With uniform distribution of random numbers from 0 to n, where n is the number of elements provided by the user.

The values are sorted into order.

Capture.PNG

1 reply

21-Topaz II
April 25, 2019

Hi,

 

With uniform distribution of random numbers from 0 to n, where n is the number of elements provided by the user.

The values are sorted into order.

Capture.PNG

16-Pearl
April 26, 2019

Thanks