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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

random vector lenght populated with random values

JBlackhole
16-Pearl

random vector lenght populated with random values

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

2 REPLIES 2

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

Thanks

Top Tags