フィルターのクリア

How to generate a random number in matlab?

2 ビュー (過去 30 日間)
Walshaikhli
Walshaikhli 2015 年 3 月 8 日
編集済み: Walshaikhli 2017 年 3 月 27 日
How to generate a random number in matlab?

採用された回答

Jan
Jan 2015 年 3 月 8 日
編集済み: Jan 2015 年 3 月 8 日
This is shown in the documentation: doc rand , especially: floating-point-numbers-within-specific-range
a = 0.01;
b = 50;
r = (b-a) * rand + a;
Reading the documentation is a very efficient way to solve such questions. The docs of Matlab are excellent.

その他の回答 (1 件)

Konstantinos Sofos
Konstantinos Sofos 2015 年 3 月 10 日
Hi,
myrandom = randi([0.01,50],1,1);
Mathworks documentation is excellent!
Regards

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by