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

2 Ansichten (letzte 30 Tage)
Q

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Random Number Generation finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by