random numbers can be divided b
10 views (last 30 days)
Star Strider on 15 Jun 2019
r5 = randi(10,1,20)*5; % Creates 20 Random Integers From 5 To 50, All Of Which Can Be Divided Evenly By 5
Test = rem(r5,5)
The ‘Test’ vector will have elements only equal to 0.
To specify a range, see: Random Integers Within Specified Interval (link).