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

95 visualizaciones (últimos 30 días)
how do i create a random matrix with set size eg 4x6 yet the numbers are in a range from 0-9

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by