randint is undifined in 2018a

29 views (last 30 days)
chu ji
chu ji on 8 Oct 2019
Commented: Adam Danz on 5 May 2020
randint is undifined in 2018a
  1 Comment
Andreas
Andreas on 8 Oct 2019
>> randint
Error using randint
RANDINT has been removed. Use RANDI instead.

Sign in to comment.

Accepted Answer

Steven Lord
Steven Lord on 8 Oct 2019
According to the Communications Toolbox Release Notes the randint function was removed in release R2016b. The suggested replacement is randi. Note that the order of the inputs to randi and the order of inputs to randint are different. The range is the third input to randint but the first input to randi (and it behaves a little differently if that range input is negative), so converting your code is not as simple as doing a Find and Replace.
Here's the documentation for randint in release R2012a for reference.
  2 Comments
chu ji
chu ji on 21 Oct 2019
Thank you so much for your answer. This helps me a lot.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!