How can I create a vector x
in Matlab that has values between 0.8 and 1.2, randomly sampled from a:
1. Uniform
2. Normal
distribution?
There are a lot of functions dealing with distributions, but I'm having trouble using them properly.
How can I create a vector x
in Matlab that has values between 0.8 and 1.2, randomly sampled from a:
1. Uniform
2. Normal
distribution?
There are a lot of functions dealing with distributions, but I'm having trouble using them properly.
So, you can use this, for example:
this will generate random number between 0.8 and 1.2. because rand creates uniform distribution I believe that
rand*0.4
creates the same ;)