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

69 Ansichten (letzte 30 Tage)
how do i create a random matrix with set size eg 4x6 yet the numbers are in a range from 0-9

Akzeptierte Antwort

Matt J
Matt J am 14 Nov. 2019
Bearbeitet: Matt J am 14 Nov. 2019
randi([0,9],4,6) %random integers
or
9*rand(4,6) %non-integers

Weitere Antworten (0)

Tags

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by