🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to change seed for random coordinate generation in the API?

satriUser: "satri"
Altair Community Member
Updated by satri

I am trying to generate random coordinates between -150.0E-6 to 150.0e-6 but when i use this function 

image

I get random coordinates but when i repeat the simulation i get the same set of coordinates. so i am trying to change the seed of the random number generator. Hence I try this to change the seed value

Hence i tried to generate a random integer using srand function but this gives me numbers  which are not random they give me one random coordinate and all other random coordinates stack on top of each other.

image

Please tell me how to change the seed value for the random number generator

Find more posts tagged with

Sort by:
1 - 1 of 11