How do I use rand() to generate two vectors with n number of elements?
33 ビュー (過去 30 日間)
古いコメントを表示
How do I use rand() to generate two vectors with 10000 elements? Trying to make the elements in the vectors range between 0 and 100 uniformly.
0 件のコメント
回答 (1 件)
Mohammad Sami
2020 年 10 月 1 日
vector = rand(10000,1)*100;
% if you want integers
vector = randi(100,10000,1);
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!