Generate random matrix ‘r’ of size 3 by 4 with number varying between -4 and 6

1 vue (au cours des 30 derniers jours)
Q

Réponse acceptée

KSSV
KSSV le 1 Oct 2016
a = -4;
b = 6;
r = (b-a).*rand(3,4) + a;

Plus de réponses (0)

Catégories

En savoir plus sur Random Number Generation dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by