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

1 view (last 30 days)
Q

Accepted Answer

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

More Answers (0)

Categories

Find more on Random Number Generation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!