I want to generate the random vector containing the number from the user defined range. For example: numbers = [1 2 4 10] The random vector should always consist of these numbers. Eg. rand_num= [1 1 2 10 5 2 10] Thanks.
相关问题
- Extract matrix elements using a vector of column i
- Unity - Get Random Color at Spawning
- How do you get R's null and residual deviance
- How to display an image represented by three matri
- OpenCV - Is there an implementation of marker base
相关文章
- why 48 bit seed in util Random class?
- How do I append metadata to an image in Matlab?
- Need help generating discrete random numbers from
- How can I write-protect the Matlab language?
- `std::sin` is wrong in the last bit
- Escape sequence to display apostrophe in MATLAB
- Get random records with Doctrine
- Vertical line fit using polyfit
Let
You can use
randsample
(Statistics Toolbox):or
randi
(standard function):