create nononteger random matrix in certain range

Ihave to create 5X5 random noninteger matrix in the range of -100:100. I create it, but there are all integer numbers.
I need something like this
-99.8 4.5 2.2 5.7 67.6
-67.8 -20.4 e.t.c

2 件のコメント

Steven Lord
Steven Lord 2021 年 10 月 19 日
From which distribution do you want to draw these numbers? Uniform, truncated normal, or some other distribution?
All the numbers in your example have one decimal place. Is that a requirement or would something like 1.23456789 be acceptable?
David Kenkadze
David Kenkadze 2021 年 10 月 20 日
yes. values must not be integers

サインインしてコメントする。

 採用された回答

Matt J
Matt J 2021 年 10 月 19 日

1 投票

200*rand(5)-100

1 件のコメント

David Kenkadze
David Kenkadze 2021 年 10 月 20 日
Tnx. It works, but it has strange form of writing.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

リリース

R2019b

質問済み:

2021 年 10 月 19 日

コメント済み:

2021 年 10 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by