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

88

Q

Best Answer

a = -4;
b = 6;
r = (b-a).*rand(3,4) + a;