how to generate random data
显示 更早的评论
number of data = 1000; dimension=20; and save in mat format.
5 个评论
jgg
2016-1-7
What kind of randomness do you want? There are many ways to generate a random variable. For instance, rand(1000,20) will give you a matrix of the desired size that is uniformly distributed on 0 to 1.
Image Analyst
2016-1-7
What do you mean by dimension=20? Do you mean it's a 1-D vector with a length of 20 elements or 1000 elements, or do you mean a 20-D array with 1000 length of each dimension (in which case you won't have enough memory)?
If you want this:
data = rand(1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000);
then you can't have that and you most likely don't need that.
jgg
2016-1-7
I'm not sure what you mean? What kind of labels do you want assigned?
the cyclist
2016-1-7
How about this, fred? Spend the time to compose a complete, coherent description of what it is that you want as input and output from your program. This isn't twitter; feel free to use more than 140 characters.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!