Create a function called UniformAB that allow to generate N as a random integer value between A and B
显示 更早的评论
Create a function called UniformAB that allow to generate N as a random integer value between A and B
2 个评论
Daniel Pollard
2020-12-9
https://uk.mathworks.com/help/matlab/ref/randi.html
Adam Danz
2020-12-9
Do you have a question?
回答(1 个)
Manvi Goel
2020-12-14
function N = UniformAB(a, b)
N = randi([a,b], 1,1);
end
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!