create nononteger random matrix in certain range

1 次查看(过去 30 天)
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?

请先登录,再进行评论。

采纳的回答

Matt J
Matt J 2021-10-19
200*rand(5)-100

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by