how to generate random data
Afficher commentaires plus anciens
number of data = 1000; dimension=20; and save in mat format.
5 commentaires
jgg
le 7 Jan 2016
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
le 7 Jan 2016
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
le 7 Jan 2016
I'm not sure what you mean? What kind of labels do you want assigned?
the cyclist
le 7 Jan 2016
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Random Number Generation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!