Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hello,
How can I use "rnd" function to generate random numbers between [-1,1] rather than [0,1] ?
Thank you.
Solved! Go to Solution.
rnd(2) -1
You may use a selfdefined function rand(a,b):=a + rnd(b-a)
If you need a vector of more values you may use runif(100,-1,1)
rnd(2) -1
You may use a selfdefined function rand(a,b):=a + rnd(b-a)
If you need a vector of more values you may use runif(100,-1,1)
Thank you.