how do i create a random matrix with set size yet the numbers are in a range from 0-9

50 次查看(过去 30 天)
how do i create a random matrix with set size eg 4x6 yet the numbers are in a range from 0-9

采纳的回答

Matt J
Matt J 2019-11-14
编辑:Matt J 2019-11-14
randi([0,9],4,6) %random integers
or
9*rand(4,6) %non-integers

更多回答(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