Azzera filtri
Azzera filtri

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

50 visualizzazioni (ultimi 30 giorni)
how do i create a random matrix with set size eg 4x6 yet the numbers are in a range from 0-9

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by