Create a function called UniformAB that allow to generate N as a random integer value between A and B

2 visualizzazioni (ultimi 30 giorni)
Create a function called UniformAB that allow to generate N as a random integer value between A and B

Risposte (1)

Manvi Goel
Manvi Goel il 14 Dic 2020
function N = UniformAB(a, b)
N = randi([a,b], 1,1);
end

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by