Create a function called UniformAB that allow to generate N as a random integer value between A and B
Show older comments
Create a function called UniformAB that allow to generate N as a random integer value between A and B
2 Comments
Daniel Pollard
on 9 Dec 2020
https://uk.mathworks.com/help/matlab/ref/randi.html
Adam Danz
on 9 Dec 2020
Do you have a question?
Answers (1)
Manvi Goel
on 14 Dec 2020
function N = UniformAB(a, b)
N = randi([a,b], 1,1);
end
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!