samedi 10 novembre 2018

Generating larger random integers - MATLAB

Trying to assign appropriate value to 'x' that would result in random integers between 1 to 60. Any suggestions? I did 'randn' but am getting small numbers over and over. Here's the code so far:

function s = Q11sub1(x)

x = 

if x <= 30      

s = "small";

elseif x > 30 & x <= 50 

 s = "medium";

 else

s = "high";

end

end




Aucun commentaire:

Enregistrer un commentaire